Replacing calls to getAttr with calls to hasAttr for clarity. No functional change intended -- this only replaces Boolean uses of getAttr.
llvm-svn: 197648
This commit is contained in:
@@ -1941,11 +1941,11 @@ CodeGenModule::GetLLVMLinkageVarDefinition(const VarDecl *D, bool isConstant) {
|
||||
Linkage == GVA_ExplicitTemplateInstantiation)
|
||||
return llvm::GlobalVariable::WeakODRLinkage;
|
||||
else if (!getLangOpts().CPlusPlus &&
|
||||
((!CodeGenOpts.NoCommon && !D->getAttr<NoCommonAttr>()) ||
|
||||
D->getAttr<CommonAttr>()) &&
|
||||
((!CodeGenOpts.NoCommon && !D->hasAttr<NoCommonAttr>()) ||
|
||||
D->hasAttr<CommonAttr>()) &&
|
||||
!D->hasExternalStorage() && !D->getInit() &&
|
||||
!D->getAttr<SectionAttr>() && !D->getTLSKind() &&
|
||||
!D->getAttr<WeakImportAttr>()) {
|
||||
!D->hasAttr<SectionAttr>() && !D->getTLSKind() &&
|
||||
!D->hasAttr<WeakImportAttr>()) {
|
||||
// Thread local vars aren't considered common linkage.
|
||||
return llvm::GlobalVariable::CommonLinkage;
|
||||
} else if (D->getTLSKind() == VarDecl::TLS_Dynamic &&
|
||||
|
||||
Reference in New Issue
Block a user