clang: lib/CIR/CodeGen/CIRGenModule.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H
14#define LLVM_CLANG_LIB_CIR_CODEGEN_CIRGENMODULE_H
15
22
26
28#include "mlir/IR/Builders.h"
29#include "mlir/IR/BuiltinOps.h"
30#include "mlir/IR/MLIRContext.h"
35#include "llvm/ADT/StringRef.h"
36#include "llvm/TargetParser/Triple.h"
37
46
48
51
53
54
55
57 CIRGenModule(CIRGenModule &) = delete;
58 CIRGenModule &operator=(CIRGenModule &) = delete;
59
60public:
61 CIRGenModule(mlir::MLIRContext &mlirContext, clang::ASTContext &astContext,
64
66
67private:
68 mutable std::unique_ptr theTargetCIRGenInfo;
69
71
72
74
76
78
79
80 mlir::ModuleOp theModule;
81
83
85
86 std::unique_ptr abi;
87
89
90
92
93
94
96
98
99public:
100 mlir::ModuleOp getModule() const { return theModule; }
108
110 mlir::MLIRContext &getMLIRContext() { return *builder.getContext(); }
111
117
118
119
120
121
123
124
125
126
127
129
130
131
133
134
136
137
138
141 void mapBlockAddress(cir::BlockAddrInfoAttr blockInfo, cir::LabelOp label);
145 cir::LabelOp newLabel);
146
148
150
151 mlir::Operation *getGlobalValue(llvm::StringRef ref);
152
156
160
162 cir::GlobalLinkageKind linkage);
163
164
165
169
172
173 static cir::GlobalOp createGlobalOp(CIRGenModule &cgm, mlir::Location loc,
174 llvm::StringRef name, mlir::Type t,
175 bool isConstant = false,
176 mlir::Operation *insertPoint = nullptr);
177
178
179
181 std::optional priority = std::nullopt);
183 std::optional priority = std::nullopt);
184
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
233 }
234
237
238
239
240
241
242
243
244 mlir::Value
247
248
250
253 llvm::iterator_rangeCastExpr::path\_const\_iterator path);
254
255
256
257
258
259
260
262 mlir::NamedAttrList &attrs);
263
264
265
266
267
269 mlir::Location loc, llvm::StringRef name, mlir::Type ty,
271
273
274
275
277
278
280 bool forEH = false);
281
283 switch (v) {
285 return mlir::SymbolTable::Visibility::Public;
287 return mlir::SymbolTable::Visibility::Private;
289
290
291
292
293
294
295 return mlir::SymbolTable::Visibility::Public;
296 }
297 llvm_unreachable("unknown visibility!");
298 }
299
301
302
304
305
306
308 llvm::StringRef name = ".str");
309
310
311
312 cir::GlobalViewAttr
314 llvm::StringRef name = ".str");
315
316
317
318
319
321
322
323
324
325
327
329
330
331
334
335
336
338
339
340
343
344
348
349
353
354 cir::FuncOp
357 cir::FuncType fnType = nullptr, bool dontDefer = false,
360 isForDefinition)
361 .second;
362 }
363
366 cir::FuncType fnType = nullptr, bool dontDefer = false,
368
371
373 return vtables.getItaniumVTableContext();
374 }
376 return vtables.getItaniumVTableContext();
377 }
378
379
380
381
382
384
385
386
391
393
394
395
397
398
399
400
401
403
405
406
407
408
409 cir::FuncOp
411 bool forVTable = false, bool dontDefer = false,
413
414 mlir::Operation *
417
418
424
425
426
429
430
431
433
434 void emitAliasForGlobal(llvm::StringRef mangledName, mlir::Operation *op,
435 GlobalDecl aliasGD, cir::FuncOp aliasee,
436 cir::GlobalLinkageKind linkage);
437
439
440
442 void setDSOLocal(mlir::Operation *op) const;
443 void setDSOLocal(cir::CIRGlobalValueInterface gv) const;
444
445
446
449
450
451
453
454
456
457
459 bool isIncompleteFunction, bool isThunk);
460
461
463 cir::FuncOp f);
464
466 mlir::Operation *op = nullptr);
469 bool isTentative = false);
470
471
473 bool performInit);
474
476 bool performInit);
477
481 template <typename BeforeOpTy, typename DataClauseTy>
483 DataClauseTy dataClause,
485 bool structured, bool implicit,
486 bool requiresDtor);
487
488
493
494
496
497
498
500
502
503
504
506
508
510
511
512
513
514
515
516
519
521
522
524
525
526
527
529
532
533 static void setInitializer(cir::GlobalOp &op, mlir::Attribute value);
534
536 cir::FuncOp newFn);
537
538 cir::FuncOp
541 bool dontDefer = false, bool isThunk = false,
543 mlir::ArrayAttr extraAttrs = {});
544
545 cir::FuncOp createCIRFunction(mlir::Location loc, llvm::StringRef name,
546 cir::FuncType funcType,
548
549
551 cir::FuncType ty,
553
554
557
559 mlir::ArrayAttr = {}, bool isLocal = false,
560 bool assumeConvergent = false);
561
562 static constexpr const char *builtinCoroId = "__builtin_coro_id";
565
566
567
569
571 return builder.getSizeFromCharUnits(size);
572 }
573
574
576
577
579
580 const llvm::Triple &getTriple() const { return target.getTriple(); }
581
582
584
585
586
587
588
589 static mlir::SymbolTable::Visibility
592 clang::VisibilityAttr::VisibilityType visibility);
595 static mlir::SymbolTable::Visibility getMLIRVisibility(cir::GlobalOp op);
598 bool isConstantVariable);
601 f.setLinkageAttr(cir::GlobalLinkageKindAttr::get(&getMLIRContext(), l));
602 mlir::SymbolTable::setSymbolVisibility(f,
604 }
605
607 bool isConstant);
608
609 void addReplacement(llvm::StringRef name, mlir::Operation *op);
610
611
613
614 template
616 const T &name) {
617 unsigned diagID =
619 "ClangIR code gen Not Yet Implemented: %0: %1");
620 return diags.Report(loc, diagID) << feature << name;
621 }
622
624
625 unsigned diagID = diags.getCustomDiagID(
627 return diags.Report(diagID) << feature;
628 }
629
631
632 unsigned diagID = diags.getCustomDiagID(
634 return diags.Report(diagID) << feature;
635 }
636
638
639 template
641 const T &name) {
643 }
644
645private:
646
647 llvm::MapVector<clang::GlobalDecl, llvm::StringRef> mangledDeclNames;
648 llvm::StringMap<clang::GlobalDecl, llvm::BumpPtrAllocator> manglings;
649
650
651 typedef llvm::StringMap<mlir::Operation *> ReplacementsTy;
652 ReplacementsTy replacements;
653
654 void applyReplacements();
655
656
657
658
659 void replacePointerTypeArgs(cir::FuncOp oldF, cir::FuncOp newF);
660
661 void setNonAliasAttributes(GlobalDecl gd, mlir::Operation *op);
662
663
664 std::optionalcir::SourceLanguage getCIRSourceLanguage() const;
665};
666}
667
668}
669
670#endif
Defines the SourceManager interface.
__device__ __2f16 float __ockl_bool s
__device__ __2f16 float c
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Implements C++ ABI-specific code generation functions.
Abstract information about a function or function prototype.
void updateResolvedBlockAddress(cir::BlockAddressOp op, cir::LabelOp newLabel)
void emitCXXGlobalVarDeclInit(const VarDecl *varDecl, cir::GlobalOp addr, bool performInit)
Emit the function that initializes the specified global.
void replaceUsesOfNonProtoTypeWithRealFunction(mlir::Operation *old, cir::FuncOp newFn)
This function is called when we implement a function with no prototype, e.g.
llvm::StringRef getMangledName(clang::GlobalDecl gd)
cir::GlobalOp getOrCreateStaticVarDecl(const VarDecl &d, cir::GlobalLinkageKind linkage)
CharUnits computeNonVirtualBaseClassOffset(const CXXRecordDecl *derivedClass, llvm::iterator_range< CastExpr::path_const_iterator > path)
void setGlobalVisibility(mlir::Operation *op, const NamedDecl *d) const
Set the visibility for the given global.
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
void emitDeferred()
Emit any needed decls for which code generation was deferred.
clang::ASTContext & getASTContext() const
Definition CIRGenModule.h:102
cir::FuncOp getAddrOfCXXStructor(clang::GlobalDecl gd, const CIRGenFunctionInfo *fnInfo=nullptr, cir::FuncType fnType=nullptr, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition)
Definition CIRGenModule.h:355
cir::FuncOp createRuntimeFunction(cir::FuncType ty, llvm::StringRef name, mlir::ArrayAttr={}, bool isLocal=false, bool assumeConvergent=false)
llvm::DenseMap< cir::BlockAddrInfoAttr, cir::LabelOp > blockAddressInfoToLabel
Map BlockAddrInfoAttr (function name, label name) to the corresponding CIR LabelOp.
Definition CIRGenModule.h:132
void emitTopLevelDecl(clang::Decl *decl)
CharUnits getDynamicOffsetAlignment(CharUnits actualBaseAlign, const CXXRecordDecl *baseDecl, CharUnits expectedTargetAlign)
TODO: Add TBAAAccessInfo.
void emitGlobalOpenACCDeclareDataOperands(const Expr *varOperand, DataClauseTy dataClause, OpenACCModifierKind modifiers, bool structured, bool implicit, bool requiresDtor)
void addReplacement(llvm::StringRef name, mlir::Operation *op)
mlir::Type convertType(clang::QualType type)
bool shouldEmitRTTI(bool forEH=false)
Definition CIRGenModule.h:419
cir::GlobalOp getGlobalForStringLiteral(const StringLiteral *s, llvm::StringRef name=".str")
Return a global symbol reference to a constant array for the given string literal.
void mapUnresolvedBlockAddress(cir::BlockAddressOp op)
bool mustBeEmitted(const clang::ValueDecl *d)
Determine whether the definition must be emitted; if this returns false, the definition can be emitte...
void constructAttributeList(CIRGenCalleeInfo calleeInfo, mlir::NamedAttrList &attrs)
Get the CIR attributes and calling convention to use for a particular function type.
void emitGlobalOpenACCDeclareDecl(const clang::OpenACCDeclareDecl *cd)
mlir::IntegerAttr getSize(CharUnits size)
Definition CIRGenModule.h:570
DiagnosticBuilder errorNYI(SourceRange loc, llvm::StringRef feature, const T &name)
Definition CIRGenModule.h:640
CIRGenBuilderTy & getBuilder()
Definition CIRGenModule.h:101
void setDSOLocal(mlir::Operation *op) const
std::string getUniqueGlobalName(const std::string &baseName)
std::pair< cir::FuncType, cir::FuncOp > getAddrAndTypeOfCXXStructor(clang::GlobalDecl gd, const CIRGenFunctionInfo *fnInfo=nullptr, cir::FuncType fnType=nullptr, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition)
ItaniumVTableContext & getItaniumVTableContext()
Definition CIRGenModule.h:372
void setGVProperties(mlir::Operation *op, const NamedDecl *d) const
Set visibility, dllimport/dllexport and dso_local.
cir::GlobalOp getOrCreateCIRGlobal(llvm::StringRef mangledName, mlir::Type ty, LangAS langAS, const VarDecl *d, ForDefinition_t isForDefinition)
If the specified mangled name is not in the module, create and return an mlir::GlobalOp value.
cir::FuncOp createCIRBuiltinFunction(mlir::Location loc, llvm::StringRef name, cir::FuncType ty, const clang::FunctionDecl *fd)
Create a CIR function with builtin attribute set.
llvm::DenseMap< const Decl *, cir::GlobalOp > staticLocalDeclMap
Definition CIRGenModule.h:149
void emitGlobalOpenACCRoutineDecl(const clang::OpenACCRoutineDecl *cd)
clang::CharUnits getClassPointerAlignment(const clang::CXXRecordDecl *rd)
Return the best known alignment for an unknown pointer to a particular class.
void handleCXXStaticMemberVarInstantiation(VarDecl *vd)
Tell the consumer that this variable has been instantiated.
void emitGlobalDefinition(clang::GlobalDecl gd, mlir::Operation *op=nullptr)
void mapResolvedBlockAddress(cir::BlockAddressOp op, cir::LabelOp)
clang::DiagnosticsEngine & getDiags() const
Definition CIRGenModule.h:105
CharUnits getVBaseAlignment(CharUnits derivedAlign, const CXXRecordDecl *derived, const CXXRecordDecl *vbase)
Returns the assumed alignment of a virtual base of a class.
mlir::Attribute getAddrOfRTTIDescriptor(mlir::Location loc, QualType ty, bool forEH=false)
Get the address of the RTTI descriptor for the given type.
clang::CharUnits getNaturalTypeAlignment(clang::QualType t, LValueBaseInfo *baseInfo)
FIXME: this could likely be a common helper and not necessarily related with codegen.
void setFunctionAttributes(GlobalDecl gd, cir::FuncOp f, bool isIncompleteFunction, bool isThunk)
Set function attributes for a function declaration.
static mlir::SymbolTable::Visibility getMLIRVisibilityFromCIRLinkage(cir::GlobalLinkageKind GLK)
const ItaniumVTableContext & getItaniumVTableContext() const
Definition CIRGenModule.h:375
const clang::TargetInfo & getTarget() const
Definition CIRGenModule.h:103
mlir::TypedAttr emitNullConstantForBase(const CXXRecordDecl *record)
Return a null constant appropriate for zero-initializing a base class with the given type.
cir::FuncOp getBuiltinLibFunction(const FunctionDecl *fd, unsigned builtinID)
Given a builtin id for a function like "__builtin_fabsf", return a Function* for "fabsf".
const llvm::Triple & getTriple() const
Definition CIRGenModule.h:580
static mlir::SymbolTable::Visibility getMLIRVisibility(Visibility v)
Definition CIRGenModule.h:282
void emitTentativeDefinition(const VarDecl *d)
cir::GlobalOp createOrReplaceCXXRuntimeVariable(mlir::Location loc, llvm::StringRef name, mlir::Type ty, cir::GlobalLinkageKind linkage, clang::CharUnits alignment)
Will return a global variable of the given type.
mlir::Type getVTableComponentType()
void emitGlobalDecl(const clang::GlobalDecl &d)
Helper for emitDeferred to apply actual codegen.
cir::FuncOp getOrCreateCIRFunction(llvm::StringRef mangledName, mlir::Type funcType, clang::GlobalDecl gd, bool forVTable, bool dontDefer=false, bool isThunk=false, ForDefinition_t isForDefinition=NotForDefinition, mlir::ArrayAttr extraAttrs={})
void emitGlobalVarDefinition(const clang::VarDecl *vd, bool isTentative=false)
void setTLSMode(mlir::Operation *op, const VarDecl &d)
Set TLS mode for the given operation based on the given variable declaration.
DiagnosticBuilder errorNYI(mlir::Location loc, llvm::StringRef feature)
Definition CIRGenModule.h:623
cir::FuncOp getAddrOfFunction(clang::GlobalDecl gd, mlir::Type funcType=nullptr, bool forVTable=false, bool dontDefer=false, ForDefinition_t isForDefinition=NotForDefinition)
Return the address of the given function.
mlir::TypedAttr emitNullConstantAttr(QualType t)
void emitAliasForGlobal(llvm::StringRef mangledName, mlir::Operation *op, GlobalDecl aliasGD, cir::FuncOp aliasee, cir::GlobalLinkageKind linkage)
mlir::Value emitMemberPointerConstant(const UnaryOperator *e)
void emitGlobalOpenACCDecl(const clang::OpenACCConstructDecl *cd)
bool verifyModule() const
void emitExplicitCastExprType(const ExplicitCastExpr *e, CIRGenFunction *cgf=nullptr)
Emit type info if type of an expression is a variably modified type.
const cir::CIRDataLayout getDataLayout() const
Definition CIRGenModule.h:112
std::map< llvm::StringRef, clang::GlobalDecl > deferredDecls
This contains all the decls which have definitions but which are deferred for emission and therefore ...
Definition CIRGenModule.h:383
mlir::Value getAddrOfGlobalVar(const VarDecl *d, mlir::Type ty={}, ForDefinition_t isForDefinition=NotForDefinition)
Return the mlir::Value for the address of the given global variable.
static void setInitializer(cir::GlobalOp &op, mlir::Attribute value)
cir::GlobalViewAttr getAddrOfGlobalVarAttr(const VarDecl *d)
Return the mlir::GlobalViewAttr for the address of the given global.
void addGlobalCtor(cir::FuncOp ctor, std::optional< int > priority=std::nullopt)
Add a global constructor or destructor to the module.
cir::GlobalLinkageKind getFunctionLinkage(GlobalDecl gd)
void updateCompletedType(const clang::TagDecl *td)
const clang::CodeGenOptions & getCodeGenOpts() const
Definition CIRGenModule.h:104
const clang::LangOptions & getLangOpts() const
Definition CIRGenModule.h:107
void emitOpenACCRoutineDecl(const clang::FunctionDecl *funcDecl, cir::FuncOp func, SourceLocation pragmaLoc, ArrayRef< const OpenACCClause * > clauses)
static constexpr const char * builtinCoroAlloc
Definition CIRGenModule.h:563
cir::TLS_Model getDefaultCIRTLSModel() const
Get TLS mode from CodeGenOptions.
void addGlobalDtor(cir::FuncOp dtor, std::optional< int > priority=std::nullopt)
Add a function to the list that will be called when the module is unloaded.
CIRGenTypes & getTypes()
Definition CIRGenModule.h:106
void addDeferredDeclToEmit(clang::GlobalDecl GD)
Definition CIRGenModule.h:388
cir::FuncOp createCIRFunction(mlir::Location loc, llvm::StringRef name, cir::FuncType funcType, const clang::FunctionDecl *funcDecl)
const TargetCIRGenInfo & getTargetCIRGenInfo()
void emitCXXGlobalVarDeclInitFunc(const VarDecl *vd, cir::GlobalOp addr, bool performInit)
void setStaticLocalDeclAddress(const VarDecl *d, cir::GlobalOp c)
Definition CIRGenModule.h:157
void setGVPropertiesAux(mlir::Operation *op, const NamedDecl *d) const
LangAS getLangTempAllocaAddressSpace() const
Returns the address space for temporary allocations in the language.
llvm::DenseSet< cir::BlockAddressOp > unresolvedBlockAddressToLabel
Track CIR BlockAddressOps that cannot be resolved immediately because their LabelOp has not yet been ...
Definition CIRGenModule.h:139
cir::FuncOp codegenCXXStructor(clang::GlobalDecl gd)
mlir::Location getLoc(clang::SourceLocation cLoc)
Helpers to convert the presumed location of Clang's SourceLocation to an MLIR Location.
llvm::DenseMap< mlir::Attribute, cir::GlobalOp > constantStringMap
Definition CIRGenModule.h:300
mlir::Operation * lastGlobalOp
Definition CIRGenModule.h:122
static cir::VisibilityKind getGlobalVisibilityKindFromClangVisibility(clang::VisibilityAttr::VisibilityType visibility)
llvm::StringMap< unsigned > cgGlobalNames
Definition CIRGenModule.h:235
void setCXXSpecialMemberAttr(cir::FuncOp funcOp, const clang::FunctionDecl *funcDecl)
Mark the function as a special member (e.g. constructor, destructor)
mlir::Operation * getGlobalValue(llvm::StringRef ref)
mlir::Value emitNullConstant(QualType t, mlir::Location loc)
Return the result of value-initializing the given type, i.e.
mlir::ModuleOp getModule() const
Definition CIRGenModule.h:100
bool supportsCOMDAT() const
cir::GlobalLinkageKind getCIRLinkageForDeclarator(const DeclaratorDecl *dd, GVALinkage linkage, bool isConstantVariable)
mlir::MLIRContext & getMLIRContext()
Definition CIRGenModule.h:110
mlir::Operation * getAddrOfGlobal(clang::GlobalDecl gd, ForDefinition_t isForDefinition=NotForDefinition)
DiagnosticBuilder errorNYI(llvm::StringRef feature) const
Definition CIRGenModule.h:630
static cir::GlobalOp createGlobalOp(CIRGenModule &cgm, mlir::Location loc, llvm::StringRef name, mlir::Type t, bool isConstant=false, mlir::Operation *insertPoint=nullptr)
void maybeSetTrivialComdat(const clang::Decl &d, mlir::Operation *op)
cir::GlobalOp getStaticLocalDeclAddress(const VarDecl *d)
Definition CIRGenModule.h:153
CIRGenCXXABI & getCXXABI() const
Definition CIRGenModule.h:109
cir::GlobalViewAttr getAddrOfConstantStringFromLiteral(const StringLiteral *s, llvm::StringRef name=".str")
Return a global symbol reference to a constant array for the given string literal.
llvm::MapVector< cir::BlockAddressOp, cir::LabelOp > blockAddressToLabel
Map CIR BlockAddressOps directly to their resolved LabelOps.
Definition CIRGenModule.h:135
void emitDeclContext(const DeclContext *dc)
static constexpr const char * builtinCoroBegin
Definition CIRGenModule.h:564
bool shouldZeroInitPadding() const
Definition CIRGenModule.h:185
static constexpr const char * builtinCoroId
Definition CIRGenModule.h:562
void emitGlobal(clang::GlobalDecl gd)
Emit code for a single global function or variable declaration.
cir::LabelOp lookupBlockAddressInfo(cir::BlockAddrInfoAttr blockInfo)
bool mayBeEmittedEagerly(const clang::ValueDecl *d)
Determine whether the definition can be emitted eagerly, or should be delayed until the end of the tr...
llvm::DenseMap< const clang::FieldDecl *, llvm::StringRef > lambdaFieldToName
Keep a map between lambda fields and names, this needs to be per module since lambdas might get gener...
Definition CIRGenModule.h:128
DiagnosticBuilder errorNYI(SourceLocation loc, llvm::StringRef feature, const T &name)
Definition CIRGenModule.h:615
cir::GlobalLinkageKind getCIRLinkageVarDefinition(const VarDecl *vd, bool isConstant)
void mapBlockAddress(cir::BlockAddrInfoAttr blockInfo, cir::LabelOp label)
void setCIRFunctionAttributesForDefinition(const clang::FunctionDecl *fd, cir::FuncOp f)
Set extra attributes (inline, etc.) for a function.
std::string getOpenACCBindMangledName(const IdentifierInfo *bindName, const FunctionDecl *attachedFunction)
void emitGlobalFunctionDefinition(clang::GlobalDecl gd, mlir::Operation *op)
CIRGenVTables & getVTables()
Definition CIRGenModule.h:370
void setFunctionLinkage(GlobalDecl gd, cir::FuncOp f)
Definition CIRGenModule.h:599
std::vector< clang::GlobalDecl > deferredDeclsToEmit
Definition CIRGenModule.h:387
void emitVTable(const CXXRecordDecl *rd)
This is a callback from Sema to tell us that a particular vtable is required to be emitted in this tr...
unsigned routineCounter
Definition CIRGenModule.h:489
cir::GlobalLinkageKind getVTableLinkage(const CXXRecordDecl *rd)
Return the appropriate linkage for the vtable, VTT, and type information of the given class.
mlir::Attribute getConstantArrayFromStringLiteral(const StringLiteral *e)
Return a constant array for the given string.
cir::VisibilityAttr getGlobalVisibilityAttrFromDecl(const Decl *decl)
void setCommonAttributes(GlobalDecl gd, mlir::Operation *op)
Set attributes which are common to any form of a global definition (alias, Objective-C method,...
This class organizes the cross-module state that is used while lowering AST types to CIR types.
Represents a C++ struct/union/class.
CharUnits - This is an opaque type for sizes expressed in character units.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
Represents a ValueDecl that came out of a declarator.
A little helper class used to produce diagnostics.
Concrete class used by the front-end to report problems and issues.
ExplicitCastExpr - An explicit cast written in the source code.
This represents one expression.
Represents a function declaration or definition.
GlobalDecl - represents a global declaration.
One of these records is kept for each identifier that is lexed.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
This represents a decl that may have a name.
A (possibly-)qualified type.
Encodes a location in the source.
A trivial tuple used to represent a source range.
SourceLocation getBegin() const
StringLiteral - This represents a string literal expression, e.g.
Represents the declaration of a struct/union/class/enum.
Exposes information about the current target.
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Represents a variable declaration or definition.
Defines the clang::TargetInfo interface.
ForDefinition_t
Definition CIRGenModule.h:52
@ NotForDefinition
Definition CIRGenModule.h:52
@ ForDefinition
Definition CIRGenModule.h:52
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicDynCastAllOfMatcher< Decl, VarDecl > varDecl
Matches variable declarations.
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
The JSON file list parser is used to communicate input to InstallAPI.
GVALinkage
A more specific kind of linkage than enum Linkage.
const FunctionProtoType * T
LangAS
Defines the address space values used by the address space qualifier of QualType.
Visibility
Describes the different kinds of visibility that a declaration may have.
@ HiddenVisibility
Objects with "hidden" visibility are not seen by the dynamic linker.
@ ProtectedVisibility
Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...
@ DefaultVisibility
Objects with "default" visibility are seen by the dynamic linker and act like normal objects.