From b4b64ca752f5c0e5b95ed64a94ddaeb72e0b8f5f Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 30 Jun 2009 02:34:44 +0000 Subject: Remove the ASTContext parameter from the attribute-related methods of Decl. The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501 --- clang/lib/CodeGen/Mangle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/Mangle.cpp') diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 850183568a8..8018b4f45a8 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/lib/CodeGen/Mangle.cpp @@ -87,7 +87,7 @@ static bool isInCLinkageSpecification(const Decl *D) { bool CXXNameMangler::mangleFunctionDecl(const FunctionDecl *FD) { // Clang's "overloadable" attribute extension to C/C++ implies // name mangling (always). - if (!FD->hasAttr(Context)) { + if (!FD->hasAttr()) { // C functions are not mangled, and "main" is never mangled. if (!Context.getLangOptions().CPlusPlus || FD->isMain()) return false; @@ -111,7 +111,7 @@ bool CXXNameMangler::mangleFunctionDecl(const FunctionDecl *FD) { bool CXXNameMangler::mangle(const NamedDecl *D) { // Any decl can be declared with __asm("foo") on it, and this takes // precedence over all other naming in the .o file. - if (const AsmLabelAttr *ALA = D->getAttr(Context)) { + if (const AsmLabelAttr *ALA = D->getAttr()) { // If we have an asm name, then we use it as the mangling. Out << '\01'; // LLVM IR Marker for __asm("foo") Out << ALA->getLabel(); -- cgit v1.2.3