clang 20.0.0git
Macros | Functions
MicrosoftMangle.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/GlobalDecl.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/Basic/ABI.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/CRC.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/xxhash.h"
#include <functional>
#include <optional>
#include "clang/AST/TypeNodes.inc"
#include "clang/AST/BuiltinTypes.def"
#include "clang/Basic/OpenCLImageTypes.def"
#include "clang/Basic/OpenCLExtensionTypes.def"
#include "clang/Basic/WebAssemblyReferenceTypes.def"
#include "clang/Basic/HLSLIntangibleTypes.def"
#include "clang/Basic/AArch64SVEACLETypes.def"
#include "clang/Basic/PPCTypes.def"
#include "clang/Basic/RISCVVTypes.def"
#include "clang/Basic/AMDGPUTypes.def"

Go to the source code of this file.

Macros

#define ABSTRACT_TYPE(CLASS, PARENT)
 
#define NON_CANONICAL_TYPE(CLASS, PARENT)
 
#define TYPE(CLASS, PARENT)
 
#define ABSTRACT_TYPE(CLASS, PARENT)
 
#define NON_CANONICAL_TYPE(CLASS, PARENT)
 
#define TYPE(CLASS, PARENT)
 
#define BUILTIN_TYPE(Id, SingletonId)
 
#define PLACEHOLDER_TYPE(Id, SingletonId)    case BuiltinType::Id:
 
#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix)
 
#define EXT_OPAQUE_TYPE(ExtType, Id, Ext)
 
#define WASM_REF_TYPE(InternalName, MangledName, Id, SingletonId, AS)
 
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId)
 
#define SVE_TYPE(Name, Id, SingletonId)    case BuiltinType::Id:
 
#define PPC_VECTOR_TYPE(Name, Id, Size)    case BuiltinType::Id:
 
#define RVV_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 
#define AMDGPU_TYPE(Name, Id, SingletonId)   case BuiltinType::Id:
 

Functions

static GlobalDecl isTemplate (GlobalDecl GD, const TemplateArgumentList *&TemplateArgs)
 
static ValueDeclgetAsArrayToPointerDecayedDecl (QualType T, const APValue &V)
 If value V (with type T) represents a decayed pointer to the first element of an array, return that array.
 
static void mangleThunkThisAdjustment (AccessSpecifier AS, const ThisAdjustment &Adjustment, MicrosoftCXXNameMangler &Mangler, raw_ostream &Out)
 

Macro Definition Documentation

◆ ABSTRACT_TYPE [1/2]

#define ABSTRACT_TYPE (   CLASS,
  PARENT 
)

Definition at line 446 of file MicrosoftMangle.cpp.

◆ ABSTRACT_TYPE [2/2]

#define ABSTRACT_TYPE (   CLASS,
  PARENT 
)

Definition at line 446 of file MicrosoftMangle.cpp.

◆ AMDGPU_TYPE

#define AMDGPU_TYPE (   Name,
  Id,
  SingletonId 
)    case BuiltinType::Id:

◆ BUILTIN_TYPE

#define BUILTIN_TYPE (   Id,
  SingletonId 
)

◆ EXT_OPAQUE_TYPE

#define EXT_OPAQUE_TYPE (   ExtType,
  Id,
  Ext 
)
Value:
case BuiltinType::Id: \
mangleArtificialTagType(TagTypeKind::Struct, "ocl_" #ExtType); \
break;

◆ HLSL_INTANGIBLE_TYPE

#define HLSL_INTANGIBLE_TYPE (   Name,
  Id,
  SingletonId 
)
Value:
case BuiltinType::Id: \
mangleArtificialTagType(TagTypeKind::Struct, #Name); \
break;

◆ IMAGE_TYPE

#define IMAGE_TYPE (   ImgType,
  Id,
  SingletonId,
  Access,
  Suffix 
)
Value:
case BuiltinType::Id: \
Out << "PAUocl_" #ImgType "_" #Suffix "@@"; \
break;

◆ NON_CANONICAL_TYPE [1/2]

#define NON_CANONICAL_TYPE (   CLASS,
  PARENT 
)

Definition at line 447 of file MicrosoftMangle.cpp.

◆ NON_CANONICAL_TYPE [2/2]

#define NON_CANONICAL_TYPE (   CLASS,
  PARENT 
)
Value:
case Type::CLASS: \
llvm_unreachable("can't mangle non-canonical type " #CLASS "Type"); \
return;

Definition at line 447 of file MicrosoftMangle.cpp.

◆ PLACEHOLDER_TYPE

#define PLACEHOLDER_TYPE (   Id,
  SingletonId 
)     case BuiltinType::Id:

◆ PPC_VECTOR_TYPE

#define PPC_VECTOR_TYPE (   Name,
  Id,
  Size 
)     case BuiltinType::Id:

◆ RVV_TYPE

#define RVV_TYPE (   Name,
  Id,
  SingletonId 
)    case BuiltinType::Id:

◆ SVE_TYPE

#define SVE_TYPE (   Name,
  Id,
  SingletonId 
)     case BuiltinType::Id:

◆ TYPE [1/2]

#define TYPE (   CLASS,
  PARENT 
)
Value:
void mangleType(const CLASS##Type *T, \
Qualifiers Quals, \
SourceRange Range
Definition: SemaObjC.cpp:758
The collection of all-type qualifiers we support.
Definition: Type.h:319
A trivial tuple used to represent a source range.
The base class of the type hierarchy.
Definition: Type.h:1829
const FunctionProtoType * T

Definition at line 448 of file MicrosoftMangle.cpp.

◆ TYPE [2/2]

#define TYPE (   CLASS,
  PARENT 
)
Value:
case Type::CLASS: \
mangleType(cast<CLASS##Type>(ty), Quals, Range); \
break;

Definition at line 448 of file MicrosoftMangle.cpp.

◆ WASM_REF_TYPE

#define WASM_REF_TYPE (   InternalName,
  MangledName,
  Id,
  SingletonId,
  AS 
)
Value:
case BuiltinType::Id: \
mangleArtificialTagType(TagTypeKind::Struct, MangledName); \
mangleArtificialTagType(TagTypeKind::Struct, MangledName, {"__clang"}); \
break;

Function Documentation

◆ getAsArrayToPointerDecayedDecl()

static ValueDecl * getAsArrayToPointerDecayedDecl ( QualType  T,
const APValue V 
)
static

If value V (with type T) represents a decayed pointer to the first element of an array, return that array.

Definition at line 1728 of file MicrosoftMangle.cpp.

References clang::Type::isArrayType(), clang::Type::isPointerType(), clang::T, and V.

◆ isTemplate()

static GlobalDecl isTemplate ( GlobalDecl  GD,
const TemplateArgumentList *&  TemplateArgs 
)
static

◆ mangleThunkThisAdjustment()

static void mangleThunkThisAdjustment ( AccessSpecifier  AS,
const ThisAdjustment Adjustment,
MicrosoftCXXNameMangler &  Mangler,
raw_ostream &  Out 
)
static