clang 22.0.0git
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/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/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/AArch64ACLETypes.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)
#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)
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits)

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 447 of file MicrosoftMangle.cpp.

◆ ABSTRACT_TYPE [2/2]

#define ABSTRACT_TYPE ( CLASS,
PARENT )

Definition at line 447 of file MicrosoftMangle.cpp.

◆ 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 448 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 448 of file MicrosoftMangle.cpp.

◆ PLACEHOLDER_TYPE

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

◆ SVE_SCALAR_TYPE

#define SVE_SCALAR_TYPE ( Name,
MangledName,
Id,
SingletonId,
Bits )

◆ SVE_TYPE

#define SVE_TYPE ( Name,
Id,
SingletonId )
Value:
case BuiltinType::Id: \
mangleArtificialTagType(TagTypeKind::Struct, #Name, {"__clang"}); \
break;

◆ TYPE [1/2]

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

Definition at line 449 of file MicrosoftMangle.cpp.

◆ TYPE [2/2]

#define TYPE ( CLASS,
PARENT )
Value:
case Type::CLASS: \
mangleType(cast<CLASS##Type>(ty), Quals, Range); \
break;
U cast(CodeGen::Address addr)
Definition Address.h:327

Definition at line 449 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()

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 1745 of file MicrosoftMangle.cpp.

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

◆ isTemplate()

◆ mangleThunkThisAdjustment()