Update to use hasAttr() instead of getAttr().
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 2060b5c..4cb4f55 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -60,7 +60,7 @@
/// EmitBlockVarDecl - This method handles emission of any variable declaration
/// inside a function, including static vars etc.
void CodeGenFunction::EmitBlockVarDecl(const VarDecl &D) {
- if (D.getAttr<AsmLabelAttr>())
+ if (D.hasAttr<AsmLabelAttr>())
CGM.ErrorUnsupported(&D, "__asm__");
// We don't support __thread yet.
@@ -175,7 +175,7 @@
if (const SectionAttr *SA = D.getAttr<SectionAttr>())
GV->setSection(SA->getName());
- if (D.getAttr<UsedAttr>())
+ if (D.hasAttr<UsedAttr>())
CGM.AddUsedGlobal(GV);
// We may have to cast the constant because of the initializer
@@ -235,7 +235,7 @@
/// These turn into simple stack objects, or GlobalValues depending on target.
void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) {
QualType Ty = D.getType();
- bool isByRef = D.getAttr<BlocksAttr>();
+ bool isByRef = D.hasAttr<BlocksAttr>();
bool needsDispose = false;
llvm::Value *DeclPtr;