clang  16.0.0git
Mangle.h
Go to the documentation of this file.
1 //===--- Mangle.h - Mangle C++ Names ----------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Defines the C++ name mangling interface.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_CLANG_AST_MANGLE_H
14 #define LLVM_CLANG_AST_MANGLE_H
15 
16 #include "clang/AST/Decl.h"
17 #include "clang/AST/GlobalDecl.h"
18 #include "clang/AST/Type.h"
19 #include "clang/Basic/ABI.h"
20 #include "llvm/ADT/DenseMap.h"
21 #include "llvm/Support/Casting.h"
22 
23 namespace llvm {
24  class raw_ostream;
25 }
26 
27 namespace clang {
28  class ASTContext;
29  class BlockDecl;
30  class CXXConstructorDecl;
31  class CXXDestructorDecl;
32  class CXXMethodDecl;
33  class FunctionDecl;
34  struct MethodVFTableLocation;
35  class NamedDecl;
36  class ObjCMethodDecl;
37  class StringLiteral;
38  struct ThisAdjustment;
39  struct ThunkInfo;
40  class VarDecl;
41 
42 /// MangleContext - Context for tracking state which persists across multiple
43 /// calls to the C++ name mangler.
45 public:
46  enum ManglerKind {
49  };
50 
51 private:
52  virtual void anchor();
53 
54  ASTContext &Context;
55  DiagnosticsEngine &Diags;
56  const ManglerKind Kind;
57  /// For aux target. If true, uses mangling number for aux target from
58  /// ASTContext.
59  bool IsAux = false;
60 
61  llvm::DenseMap<const BlockDecl*, unsigned> GlobalBlockIds;
62  llvm::DenseMap<const BlockDecl*, unsigned> LocalBlockIds;
63  llvm::DenseMap<const NamedDecl*, uint64_t> AnonStructIds;
64  llvm::DenseMap<const FunctionDecl*, unsigned> FuncAnonStructSize;
65 
66 public:
67  ManglerKind getKind() const { return Kind; }
68 
69  bool isAux() const { return IsAux; }
70 
71  explicit MangleContext(ASTContext &Context, DiagnosticsEngine &Diags,
72  ManglerKind Kind, bool IsAux = false)
73  : Context(Context), Diags(Diags), Kind(Kind), IsAux(IsAux) {}
74 
75  virtual ~MangleContext() { }
76 
77  ASTContext &getASTContext() const { return Context; }
78 
79  DiagnosticsEngine &getDiags() const { return Diags; }
80 
81  virtual void startNewFunction() { LocalBlockIds.clear(); }
82 
83  unsigned getBlockId(const BlockDecl *BD, bool Local) {
84  llvm::DenseMap<const BlockDecl *, unsigned> &BlockIds
85  = Local? LocalBlockIds : GlobalBlockIds;
86  std::pair<llvm::DenseMap<const BlockDecl *, unsigned>::iterator, bool>
87  Result = BlockIds.insert(std::make_pair(BD, BlockIds.size()));
88  return Result.first->second;
89  }
90 
92  const FunctionDecl *FD = nullptr) {
93  auto FindResult = AnonStructIds.find(D);
94  if (FindResult != AnonStructIds.end())
95  return FindResult->second;
96 
97  // If FunctionDecl is passed in, the anonymous structID will be per-function
98  // based.
99  unsigned Id = FD ? FuncAnonStructSize[FD]++ : AnonStructIds.size();
100  std::pair<llvm::DenseMap<const NamedDecl *, uint64_t>::iterator, bool>
101  Result = AnonStructIds.insert(std::make_pair(D, Id));
102  return Result.first->second;
103  }
104 
106  llvm::DenseMap<const NamedDecl *, uint64_t>::iterator Result =
107  AnonStructIds.find(D);
108  // The decl should already be inserted, but return 0 in case it is not.
109  if (Result == AnonStructIds.end())
110  return 0;
111  return Result->second;
112  }
113 
114  virtual std::string getLambdaString(const CXXRecordDecl *Lambda) = 0;
115 
116  /// @name Mangler Entry Points
117  /// @{
118 
119  bool shouldMangleDeclName(const NamedDecl *D);
120  virtual bool shouldMangleCXXName(const NamedDecl *D) = 0;
121  virtual bool shouldMangleStringLiteral(const StringLiteral *SL) = 0;
122 
123  virtual bool isUniqueInternalLinkageDecl(const NamedDecl *ND) {
124  return false;
125  }
126 
128 
129  // FIXME: consider replacing raw_ostream & with something like SmallString &.
130  void mangleName(GlobalDecl GD, raw_ostream &);
131  virtual void mangleCXXName(GlobalDecl GD, raw_ostream &) = 0;
132  virtual void mangleThunk(const CXXMethodDecl *MD,
133  const ThunkInfo &Thunk,
134  raw_ostream &) = 0;
135  virtual void mangleCXXDtorThunk(const CXXDestructorDecl *DD, CXXDtorType Type,
137  raw_ostream &) = 0;
138  virtual void mangleReferenceTemporary(const VarDecl *D,
139  unsigned ManglingNumber,
140  raw_ostream &) = 0;
141  virtual void mangleCXXRTTI(QualType T, raw_ostream &) = 0;
142  virtual void mangleCXXRTTIName(QualType T, raw_ostream &) = 0;
143  virtual void mangleStringLiteral(const StringLiteral *SL, raw_ostream &) = 0;
144  virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream&);
145 
146  void mangleGlobalBlock(const BlockDecl *BD,
147  const NamedDecl *ID,
148  raw_ostream &Out);
150  const BlockDecl *BD, raw_ostream &Out);
151  void mangleDtorBlock(const CXXDestructorDecl *CD, CXXDtorType DT,
152  const BlockDecl *BD, raw_ostream &Out);
153  void mangleBlock(const DeclContext *DC, const BlockDecl *BD,
154  raw_ostream &Out);
155 
156  void mangleObjCMethodName(const ObjCMethodDecl *MD, raw_ostream &OS,
157  bool includePrefixByte = true,
158  bool includeCategoryNamespace = true);
160  raw_ostream &);
161 
162  virtual void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &) = 0;
163 
164  virtual void mangleDynamicInitializer(const VarDecl *D, raw_ostream &) = 0;
165 
166  virtual void mangleDynamicAtExitDestructor(const VarDecl *D,
167  raw_ostream &) = 0;
168 
169  virtual void mangleSEHFilterExpression(GlobalDecl EnclosingDecl,
170  raw_ostream &Out) = 0;
171 
172  virtual void mangleSEHFinallyBlock(GlobalDecl EnclosingDecl,
173  raw_ostream &Out) = 0;
174 
175  /// Generates a unique string for an externally visible type for use with TBAA
176  /// or type uniquing.
177  /// TODO: Extend this to internal types by generating names that are unique
178  /// across translation units so it can be used with LTO.
179  virtual void mangleTypeName(QualType T, raw_ostream &) = 0;
180 
181  /// @}
182 };
183 
185 public:
189  bool IsAux = false)
190  : MangleContext(C, D, MK_Itanium, IsAux) {}
191 
192  virtual void mangleCXXVTable(const CXXRecordDecl *RD, raw_ostream &) = 0;
193  virtual void mangleCXXVTT(const CXXRecordDecl *RD, raw_ostream &) = 0;
194  virtual void mangleCXXCtorVTable(const CXXRecordDecl *RD, int64_t Offset,
195  const CXXRecordDecl *Type,
196  raw_ostream &) = 0;
197  virtual void mangleItaniumThreadLocalInit(const VarDecl *D,
198  raw_ostream &) = 0;
199  virtual void mangleItaniumThreadLocalWrapper(const VarDecl *D,
200  raw_ostream &) = 0;
201 
202  virtual void mangleCXXCtorComdat(const CXXConstructorDecl *D,
203  raw_ostream &) = 0;
204  virtual void mangleCXXDtorComdat(const CXXDestructorDecl *D,
205  raw_ostream &) = 0;
206 
207  virtual void mangleLambdaSig(const CXXRecordDecl *Lambda, raw_ostream &) = 0;
208 
209  virtual void mangleDynamicStermFinalizer(const VarDecl *D, raw_ostream &) = 0;
210 
211  virtual void mangleModuleInitializer(const Module *Module, raw_ostream &) = 0;
212 
213  // This has to live here, otherwise the CXXNameMangler won't have access to
214  // it.
216  static bool classof(const MangleContext *C) {
217  return C->getKind() == MK_Itanium;
218  }
219 
220  static ItaniumMangleContext *
221  create(ASTContext &Context, DiagnosticsEngine &Diags, bool IsAux = false);
222  static ItaniumMangleContext *create(ASTContext &Context,
223  DiagnosticsEngine &Diags,
224  DiscriminatorOverrideTy Discriminator,
225  bool IsAux = false);
226 };
227 
229 public:
231  bool IsAux = false)
232  : MangleContext(C, D, MK_Microsoft, IsAux) {}
233 
234  /// Mangle vftable symbols. Only a subset of the bases along the path
235  /// to the vftable are included in the name. It's up to the caller to pick
236  /// them correctly.
237  virtual void mangleCXXVFTable(const CXXRecordDecl *Derived,
239  raw_ostream &Out) = 0;
240 
241  /// Mangle vbtable symbols. Only a subset of the bases along the path
242  /// to the vbtable are included in the name. It's up to the caller to pick
243  /// them correctly.
244  virtual void mangleCXXVBTable(const CXXRecordDecl *Derived,
246  raw_ostream &Out) = 0;
247 
248  virtual void mangleThreadSafeStaticGuardVariable(const VarDecl *VD,
249  unsigned GuardNum,
250  raw_ostream &Out) = 0;
251 
252  virtual void mangleVirtualMemPtrThunk(const CXXMethodDecl *MD,
253  const MethodVFTableLocation &ML,
254  raw_ostream &Out) = 0;
255 
256  virtual void mangleCXXVirtualDisplacementMap(const CXXRecordDecl *SrcRD,
257  const CXXRecordDecl *DstRD,
258  raw_ostream &Out) = 0;
259 
260  virtual void mangleCXXThrowInfo(QualType T, bool IsConst, bool IsVolatile,
261  bool IsUnaligned, uint32_t NumEntries,
262  raw_ostream &Out) = 0;
263 
264  virtual void mangleCXXCatchableTypeArray(QualType T, uint32_t NumEntries,
265  raw_ostream &Out) = 0;
266 
267  virtual void mangleCXXCatchableType(QualType T, const CXXConstructorDecl *CD,
268  CXXCtorType CT, uint32_t Size,
269  uint32_t NVOffset, int32_t VBPtrOffset,
270  uint32_t VBIndex, raw_ostream &Out) = 0;
271 
273  const CXXRecordDecl *Derived, uint32_t NVOffset, int32_t VBPtrOffset,
274  uint32_t VBTableOffset, uint32_t Flags, raw_ostream &Out) = 0;
275 
276  virtual void mangleCXXRTTIBaseClassArray(const CXXRecordDecl *Derived,
277  raw_ostream &Out) = 0;
278  virtual void
280  raw_ostream &Out) = 0;
281 
282  virtual void
285  raw_ostream &Out) = 0;
286 
287  static bool classof(const MangleContext *C) {
288  return C->getKind() == MK_Microsoft;
289  }
290 
291  static MicrosoftMangleContext *
292  create(ASTContext &Context, DiagnosticsEngine &Diags, bool IsAux = false);
293 };
294 
296 public:
297  explicit ASTNameGenerator(ASTContext &Ctx);
299 
300  /// Writes name for \p D to \p OS.
301  /// \returns true on failure, false on success.
302  bool writeName(const Decl *D, raw_ostream &OS);
303 
304  /// \returns name for \p D
305  std::string getName(const Decl *D);
306 
307  /// \returns all applicable mangled names.
308  /// For example C++ constructors/destructors can have multiple.
309  std::vector<std::string> getAllManglings(const Decl *D);
310 
311 private:
312  class Implementation;
313  std::unique_ptr<Implementation> Impl;
314 };
315 }
316 
317 #endif
clang::MicrosoftMangleContext::create
static MicrosoftMangleContext * create(ASTContext &Context, DiagnosticsEngine &Diags, bool IsAux=false)
Definition: MicrosoftMangle.cpp:3964
clang::MangleContext::mangleObjCMethodName
void mangleObjCMethodName(const ObjCMethodDecl *MD, raw_ostream &OS, bool includePrefixByte=true, bool includeCategoryNamespace=true)
Definition: Mangle.cpp:325
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2436
clang::MangleContext::mangleSEHFinallyBlock
virtual void mangleSEHFinallyBlock(GlobalDecl EnclosingDecl, raw_ostream &Out)=0
clang::MicrosoftMangleContext::mangleVirtualMemPtrThunk
virtual void mangleVirtualMemPtrThunk(const CXXMethodDecl *MD, const MethodVFTableLocation &ML, raw_ostream &Out)=0
clang::ASTNameGenerator::~ASTNameGenerator
~ASTNameGenerator()
Definition: Mangle.cpp:587
clang::ASTNameGenerator::writeName
bool writeName(const Decl *D, raw_ostream &OS)
Writes name for D to OS.
Definition: Mangle.cpp:589
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1389
clang::MangleContext::getLambdaString
virtual std::string getLambdaString(const CXXRecordDecl *Lambda)=0
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::MangleContext::mangleMSGuidDecl
virtual void mangleMSGuidDecl(const MSGuidDecl *GD, raw_ostream &)
Definition: Mangle.cpp:240
clang::MangleContext::mangleThunk
virtual void mangleThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk, raw_ostream &)=0
clang::ASTNameGenerator
Definition: Mangle.h:295
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:737
clang::MangleContext::mangleDynamicAtExitDestructor
virtual void mangleDynamicAtExitDestructor(const VarDecl *D, raw_ostream &)=0
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:192
clang::ItaniumMangleContext
Definition: Mangle.h:184
clang::MangleContext::getASTContext
ASTContext & getASTContext() const
Definition: Mangle.h:77
llvm::Optional
Definition: LLVM.h:40
clang::MangleContext::isUniqueInternalLinkageDecl
virtual bool isUniqueInternalLinkageDecl(const NamedDecl *ND)
Definition: Mangle.h:123
clang::MangleContext::getKind
ManglerKind getKind() const
Definition: Mangle.h:67
clang::MangleContext::mangleCtorBlock
void mangleCtorBlock(const CXXConstructorDecl *CD, CXXCtorType CT, const BlockDecl *BD, raw_ostream &Out)
Definition: Mangle.cpp:271
clang::ASTNameGenerator::ASTNameGenerator
ASTNameGenerator(ASTContext &Ctx)
Definition: Mangle.cpp:584
clang::MangleContext::shouldMangleStringLiteral
virtual bool shouldMangleStringLiteral(const StringLiteral *SL)=0
clang::MangleContext::getBlockId
unsigned getBlockId(const BlockDecl *BD, bool Local)
Definition: Mangle.h:83
clang::MangleContext::mangleDtorBlock
void mangleDtorBlock(const CXXDestructorDecl *CD, CXXDtorType DT, const BlockDecl *BD, raw_ostream &Out)
Definition: Mangle.cpp:280
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1565
Decl.h
Offset
unsigned Offset
Definition: Format.cpp:2717
ABI.h
clang::GlobalDecl
GlobalDecl - represents a global declaration.
Definition: GlobalDecl.h:56
clang::MangleContext::mangleObjCMethodNameAsSourceName
void mangleObjCMethodNameAsSourceName(const ObjCMethodDecl *MD, raw_ostream &)
Definition: Mangle.cpp:382
clang::MicrosoftMangleContext::classof
static bool classof(const MangleContext *C)
Definition: Mangle.h:287
clang::ItaniumMangleContext::classof
static bool classof(const MangleContext *C)
Definition: Mangle.h:216
clang::MangleContext::MangleContext
MangleContext(ASTContext &Context, DiagnosticsEngine &Diags, ManglerKind Kind, bool IsAux=false)
Definition: Mangle.h:71
clang::MicrosoftMangleContext::MicrosoftMangleContext
MicrosoftMangleContext(ASTContext &C, DiagnosticsEngine &D, bool IsAux=false)
Definition: Mangle.h:230
clang::MangleContext::mangleCXXDtorThunk
virtual void mangleCXXDtorThunk(const CXXDestructorDecl *DD, CXXDtorType Type, const ThisAdjustment &ThisAdjustment, raw_ostream &)=0
clang::ItaniumMangleContext::mangleLambdaSig
virtual void mangleLambdaSig(const CXXRecordDecl *Lambda, raw_ostream &)=0
clang::MangleContext::getAnonymousStructId
uint64_t getAnonymousStructId(const NamedDecl *D, const FunctionDecl *FD=nullptr)
Definition: Mangle.h:91
clang::MangleContext::mangleCXXRTTIName
virtual void mangleCXXRTTIName(QualType T, raw_ostream &)=0
clang::MangleContext
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
Definition: Mangle.h:44
clang::CXXCtorType
CXXCtorType
C++ constructor types.
Definition: ABI.h:24
clang::Module
Describes a module or submodule.
Definition: Module.h:98
clang::MangleContext::~MangleContext
virtual ~MangleContext()
Definition: Mangle.h:75
clang::MicrosoftMangleContext::mangleCXXRTTIBaseClassDescriptor
virtual void mangleCXXRTTIBaseClassDescriptor(const CXXRecordDecl *Derived, uint32_t NVOffset, int32_t VBPtrOffset, uint32_t VBTableOffset, uint32_t Flags, raw_ostream &Out)=0
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4283
Id
int Id
Definition: ASTDiff.cpp:189
hlsl::uint64_t
unsigned long uint64_t
Definition: hlsl_basic_types.h:25
clang::MangleContext::getDiags
DiagnosticsEngine & getDiags() const
Definition: Mangle.h:79
clang::ItaniumMangleContext::mangleCXXVTT
virtual void mangleCXXVTT(const CXXRecordDecl *RD, raw_ostream &)=0
clang::MicrosoftMangleContext::mangleCXXThrowInfo
virtual void mangleCXXThrowInfo(QualType T, bool IsConst, bool IsVolatile, bool IsUnaligned, uint32_t NumEntries, raw_ostream &Out)=0
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:209
clang::MicrosoftMangleContext::mangleCXXRTTICompleteObjectLocator
virtual void mangleCXXRTTICompleteObjectLocator(const CXXRecordDecl *Derived, ArrayRef< const CXXRecordDecl * > BasePath, raw_ostream &Out)=0
clang::CXXDtorType
CXXDtorType
C++ destructor types.
Definition: ABI.h:33
clang::MangleContext::mangleName
void mangleName(GlobalDecl GD, raw_ostream &)
Definition: Mangle.cpp:139
clang::ItaniumMangleContext::mangleCXXDtorComdat
virtual void mangleCXXDtorComdat(const CXXDestructorDecl *D, raw_ostream &)=0
clang::ASTNameGenerator::Implementation
Definition: Mangle.cpp:392
clang::MangleContext::mangleStaticGuardVariable
virtual void mangleStaticGuardVariable(const VarDecl *D, raw_ostream &)=0
clang::MSGuidDecl
A global _GUID constant.
Definition: DeclCXX.h:4188
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2703
clang::MangleContext::mangleTypeName
virtual void mangleTypeName(QualType T, raw_ostream &)=0
Generates a unique string for an externally visible type for use with TBAA or type uniquing.
Type.h
clang::MangleContext::mangleBlock
void mangleBlock(const DeclContext *DC, const BlockDecl *BD, raw_ostream &Out)
Definition: Mangle.cpp:289
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:906
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1776
clang::MicrosoftMangleContext::mangleCXXCatchableType
virtual void mangleCXXCatchableType(QualType T, const CXXConstructorDecl *CD, CXXCtorType CT, uint32_t Size, uint32_t NVOffset, int32_t VBPtrOffset, uint32_t VBIndex, raw_ostream &Out)=0
clang::MicrosoftMangleContext::mangleCXXRTTIBaseClassArray
virtual void mangleCXXRTTIBaseClassArray(const CXXRecordDecl *Derived, raw_ostream &Out)=0
clang::MicrosoftMangleContext::mangleCXXRTTIClassHierarchyDescriptor
virtual void mangleCXXRTTIClassHierarchyDescriptor(const CXXRecordDecl *Derived, raw_ostream &Out)=0
clang::ItaniumMangleContext::DiscriminatorOverrideTy
llvm::Optional< unsigned >(*)(ASTContext &, const NamedDecl *) DiscriminatorOverrideTy
Definition: Mangle.h:187
clang::ItaniumMangleContext::mangleCXXVTable
virtual void mangleCXXVTable(const CXXRecordDecl *RD, raw_ostream &)=0
clang::ItaniumMangleContext::mangleItaniumThreadLocalInit
virtual void mangleItaniumThreadLocalInit(const VarDecl *D, raw_ostream &)=0
clang::MangleContext::needsUniqueInternalLinkageNames
virtual void needsUniqueInternalLinkageNames()
Definition: Mangle.h:127
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::MangleContext::MK_Itanium
@ MK_Itanium
Definition: Mangle.h:47
clang::MangleContext::mangleSEHFilterExpression
virtual void mangleSEHFilterExpression(GlobalDecl EnclosingDecl, raw_ostream &Out)=0
clang::MangleContext::isAux
bool isAux() const
Definition: Mangle.h:69
clang::MangleContext::mangleStringLiteral
virtual void mangleStringLiteral(const StringLiteral *SL, raw_ostream &)=0
clang::MangleContext::mangleCXXRTTI
virtual void mangleCXXRTTI(QualType T, raw_ostream &)=0
clang::MangleContext::shouldMangleDeclName
bool shouldMangleDeclName(const NamedDecl *D)
Definition: Mangle.cpp:105
llvm::ArrayRef
Definition: LLVM.h:34
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::ThunkInfo
The this pointer adjustment as well as an optional return adjustment for a thunk.
Definition: Thunk.h:156
clang::MicrosoftMangleContext::mangleCXXVirtualDisplacementMap
virtual void mangleCXXVirtualDisplacementMap(const CXXRecordDecl *SrcRD, const CXXRecordDecl *DstRD, raw_ostream &Out)=0
clang::MangleContext::mangleReferenceTemporary
virtual void mangleReferenceTemporary(const VarDecl *D, unsigned ManglingNumber, raw_ostream &)=0
clang::ItaniumMangleContext::mangleCXXCtorComdat
virtual void mangleCXXCtorComdat(const CXXConstructorDecl *D, raw_ostream &)=0
clang::MicrosoftMangleContext::mangleCXXCatchableTypeArray
virtual void mangleCXXCatchableTypeArray(QualType T, uint32_t NumEntries, raw_ostream &Out)=0
clang::ASTNameGenerator::getAllManglings
std::vector< std::string > getAllManglings(const Decl *D)
Definition: Mangle.cpp:597
clang::MangleContext::mangleDynamicInitializer
virtual void mangleDynamicInitializer(const VarDecl *D, raw_ostream &)=0
clang::MangleContext::mangleCXXName
virtual void mangleCXXName(GlobalDecl GD, raw_ostream &)=0
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
clang::MicrosoftMangleContext::mangleCXXVFTable
virtual void mangleCXXVFTable(const CXXRecordDecl *Derived, ArrayRef< const CXXRecordDecl * > BasePath, raw_ostream &Out)=0
Mangle vftable symbols.
clang::ItaniumMangleContext::create
static ItaniumMangleContext * create(ASTContext &Context, DiagnosticsEngine &Diags, bool IsAux=false)
Definition: ItaniumMangle.cpp:6557
clang::Builtin::ID
ID
Definition: Builtins.h:52
clang::MangleContext::getAnonymousStructIdForDebugInfo
uint64_t getAnonymousStructIdForDebugInfo(const NamedDecl *D)
Definition: Mangle.h:105
clang
Definition: CalledOnceCheck.h:17
hlsl::int64_t
long int64_t
Definition: hlsl_basic_types.h:26
clang::ItaniumMangleContext::mangleDynamicStermFinalizer
virtual void mangleDynamicStermFinalizer(const VarDecl *D, raw_ostream &)=0
clang::MangleContext::MK_Microsoft
@ MK_Microsoft
Definition: Mangle.h:48
clang::MangleContext::startNewFunction
virtual void startNewFunction()
Definition: Mangle.h:81
clang::ItaniumMangleContext::ItaniumMangleContext
ItaniumMangleContext(ASTContext &C, DiagnosticsEngine &D, bool IsAux=false)
Definition: Mangle.h:188
GlobalDecl.h
clang::ItaniumMangleContext::getDiscriminatorOverride
virtual DiscriminatorOverrideTy getDiscriminatorOverride() const =0
clang::MicrosoftMangleContext::mangleCXXVBTable
virtual void mangleCXXVBTable(const CXXRecordDecl *Derived, ArrayRef< const CXXRecordDecl * > BasePath, raw_ostream &Out)=0
Mangle vbtable symbols.
clang::MicrosoftMangleContext
Definition: Mangle.h:228
clang::ThisAdjustment
A this pointer adjustment.
Definition: Thunk.h:91
clang::ASTNameGenerator::getName
std::string getName(const Decl *D)
Definition: Mangle.cpp:593
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1904
clang::MethodVFTableLocation
Definition: VTableBuilder.h:510
clang::ItaniumMangleContext::mangleModuleInitializer
virtual void mangleModuleInitializer(const Module *Module, raw_ostream &)=0
clang::MangleContext::mangleGlobalBlock
void mangleGlobalBlock(const BlockDecl *BD, const NamedDecl *ID, raw_ostream &Out)
Definition: Mangle.cpp:254
clang::MicrosoftMangleContext::mangleThreadSafeStaticGuardVariable
virtual void mangleThreadSafeStaticGuardVariable(const VarDecl *VD, unsigned GuardNum, raw_ostream &Out)=0
clang::MangleContext::shouldMangleCXXName
virtual bool shouldMangleCXXName(const NamedDecl *D)=0
clang::ItaniumMangleContext::mangleItaniumThreadLocalWrapper
virtual void mangleItaniumThreadLocalWrapper(const VarDecl *D, raw_ostream &)=0
clang::CXXMethodDecl
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1983
clang::ItaniumMangleContext::mangleCXXCtorVTable
virtual void mangleCXXCtorVTable(const CXXRecordDecl *RD, int64_t Offset, const CXXRecordDecl *Type, raw_ostream &)=0
clang::MangleContext::ManglerKind
ManglerKind
Definition: Mangle.h:46