From 8927c19a5ed03bef55dac4b623688387bcc794dc Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 22 Jun 2009 08:08:35 +0000 Subject: Update Clang sources to r73879. --- lib/CodeGen/CGDecl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/CGDecl.cpp') diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 29eaaad..4e603c3 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/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.hasAttr()) + if (D.hasAttr(getContext())) CGM.ErrorUnsupported(&D, "__asm__"); switch (D.getStorageClass()) { @@ -171,7 +171,7 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) { } // FIXME: Merge attribute handling. - if (const AnnotateAttr *AA = D.getAttr()) { + if (const AnnotateAttr *AA = D.getAttr(getContext())) { SourceManager &SM = CGM.getContext().getSourceManager(); llvm::Constant *Ann = CGM.EmitAnnotateAttr(GV, AA, @@ -179,10 +179,10 @@ void CodeGenFunction::EmitStaticBlockVarDecl(const VarDecl &D) { CGM.AddAnnotation(Ann); } - if (const SectionAttr *SA = D.getAttr()) + if (const SectionAttr *SA = D.getAttr(getContext())) GV->setSection(SA->getName()); - if (D.hasAttr()) + if (D.hasAttr(getContext())) CGM.AddUsedGlobal(GV); // We may have to cast the constant because of the initializer @@ -244,7 +244,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.hasAttr(); + bool isByRef = D.hasAttr(getContext()); bool needsDispose = false; unsigned Align = 0; @@ -414,7 +414,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D) { } // Handle the cleanup attribute - if (const CleanupAttr *CA = D.getAttr()) { + if (const CleanupAttr *CA = D.getAttr(getContext())) { const FunctionDecl *FD = CA->getFunctionDecl(); llvm::Constant* F = CGM.GetAddrOfFunction(GlobalDecl(FD)); -- cgit v1.1