From 4184ac847f91dc7a8644ad6c5a3e389923117eb3 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 13 Apr 2009 21:08:27 +0000 Subject: Update to use hasAttr() instead of getAttr(). - No functionality change. llvm-svn: 68987 --- clang/lib/CodeGen/CGDecl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGDecl.cpp') diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 2060b5c449d..4cb4f5530b2 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -60,7 +60,7 @@ void CodeGenFunction::EmitDecl(const Decl &D) { /// 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()) + if (D.hasAttr()) CGM.ErrorUnsupported(&D, "__asm__"); // We don't support __thread yet. @@ -175,7 +175,7 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) { if (const SectionAttr *SA = D.getAttr()) GV->setSection(SA->getName()); - if (D.getAttr()) + if (D.hasAttr()) CGM.AddUsedGlobal(GV); // We may have to cast the constant because of the initializer @@ -235,7 +235,7 @@ const llvm::Type *CodeGenFunction::BuildByRefType(QualType Ty, /// 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(); + bool isByRef = D.hasAttr(); bool needsDispose = false; llvm::Value *DeclPtr; -- cgit v1.2.3