19 if ((NoCommon || D->
hasAttr<NoCommonAttr>()) && !D->
hasAttr<CommonAttr>())
36 if (D->
hasAttr<PragmaClangBSSSectionAttr>() ||
37 D->
hasAttr<PragmaClangDataSectionAttr>() ||
38 D->
hasAttr<PragmaClangRelroSectionAttr>() ||
39 D->
hasAttr<PragmaClangRodataSectionAttr>())
47 if (D->
hasAttr<WeakImportAttr>())
64 for (
const FieldDecl *FD : RD->fields()) {
67 if (FD->hasAttr<AlignedAttr>())
97 if (
auto *VD = dyn_cast<VarDecl>(&D))
111 llvm_unreachable(
"No such linkage");
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
GVALinkage GetGVALinkageForFunction(const FunctionDecl *FD) const
bool isAlignmentRequired(const Type *T) const
Determine if the alignment the type has was required using an alignment attribute.
int64_t toBits(CharUnits CharSize) const
Convert a size in characters to a size in bits.
GVALinkage GetGVALinkageForVariable(const VarDecl *VD) const
unsigned getTypeAlignIfKnown(QualType T, bool NeedsPreferredAlignment=false) const
Return the alignment of a type, in bits, or 0 if the type is incomplete and we cannot determine the a...
const TargetInfo & getTargetInfo() const
static CharUnits fromQuantity(QuantityType Quantity)
Construct a CharUnits quantity from a raw integer type.
Decl - This represents one declaration (or definition), e.g.
Represents a member of a struct/union/class.
A (possibly-)qualified type.
bool isMicrosoft() const
Is this ABI an MSVC-compatible ABI?
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
RecordDecl * getAsRecordDecl() const
Retrieves the RecordDecl this type refers to.
Represents a variable declaration or definition.
TLSKind getTLSKind() const
const Expr * getInit() const
bool hasExternalStorage() const
Returns true if a variable has extern or private_extern storage.
Defines the clang::TargetInfo interface.
bool isVarDeclStrongDefinition(const ASTContext &Ctx, const VarDecl *D, bool NoCommon)
Check whether D is a strong definition, and thus must not be given common linkage.
bool shouldBeInCOMDAT(const ASTContext &Ctx, const Decl &D)
Check whether D should be emitted into a COMDAT group.
GVALinkage
A more specific kind of linkage than enum Linkage.
@ GVA_AvailableExternally
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
U cast(CodeGen::Address addr)