diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:34:44 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-30 02:34:44 +0000 |
commit | b4b64ca752f5c0e5b95ed64a94ddaeb72e0b8f5f (patch) | |
tree | 6d2ade4e356964cef570a0a39c0450d82beda78b /clang/lib/CodeGen/CGCall.cpp | |
parent | 57726817aa069412cf5d5fac2e81512d59c05ec8 (diff) | |
download | bcm5719-llvm-b4b64ca752f5c0e5b95ed64a94ddaeb72e0b8f5f.tar.gz bcm5719-llvm-b4b64ca752f5c0e5b95ed64a94ddaeb72e0b8f5f.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 8ff58914cb6..b5195c4a546 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -377,13 +377,13 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, // FIXME: handle sseregparm someday... if (TargetDecl) { - if (TargetDecl->hasAttr<NoThrowAttr>(getContext())) + if (TargetDecl->hasAttr<NoThrowAttr>()) FuncAttrs |= llvm::Attribute::NoUnwind; - if (TargetDecl->hasAttr<NoReturnAttr>(getContext())) + if (TargetDecl->hasAttr<NoReturnAttr>()) FuncAttrs |= llvm::Attribute::NoReturn; - if (TargetDecl->hasAttr<ConstAttr>(getContext())) + if (TargetDecl->hasAttr<ConstAttr>()) FuncAttrs |= llvm::Attribute::ReadNone; - else if (TargetDecl->hasAttr<PureAttr>(getContext())) + else if (TargetDecl->hasAttr<PureAttr>()) FuncAttrs |= llvm::Attribute::ReadOnly; } @@ -438,7 +438,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, signed RegParm = 0; if (TargetDecl) if (const RegparmAttr *RegParmAttr - = TargetDecl->getAttr<RegparmAttr>(getContext())) + = TargetDecl->getAttr<RegparmAttr>()) RegParm = RegParmAttr->getNumParams(); unsigned PointerWidth = getContext().Target.getPointerWidth(0); |