diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-18 16:11:24 +0000 |
commit | 68584ed35ad819a1668e3f527ba7f5dd4ae6a333 (patch) | |
tree | f92e4dc8a0ad0128f011a81e4ef954ff1ea7311c /lib/CodeGen/CGCall.cpp | |
parent | 0adea828ec9db09bf54ca4efa54b2a2f688726b5 (diff) |
Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 4037f32ac1..ec6058afd9 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -377,13 +377,13 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, // FIXME: handle sseregparm someday... if (TargetDecl) { - if (TargetDecl->hasAttr<NoThrowAttr>()) + if (TargetDecl->hasAttr<NoThrowAttr>(getContext())) FuncAttrs |= llvm::Attribute::NoUnwind; - if (TargetDecl->hasAttr<NoReturnAttr>()) + if (TargetDecl->hasAttr<NoReturnAttr>(getContext())) FuncAttrs |= llvm::Attribute::NoReturn; - if (TargetDecl->hasAttr<ConstAttr>()) + if (TargetDecl->hasAttr<ConstAttr>(getContext())) FuncAttrs |= llvm::Attribute::ReadNone; - else if (TargetDecl->hasAttr<PureAttr>()) + else if (TargetDecl->hasAttr<PureAttr>(getContext())) FuncAttrs |= llvm::Attribute::ReadOnly; } @@ -432,7 +432,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, // register variable. signed RegParm = 0; if (TargetDecl) - if (const RegparmAttr *RegParmAttr = TargetDecl->getAttr<RegparmAttr>()) + if (const RegparmAttr *RegParmAttr + = TargetDecl->getAttr<RegparmAttr>(getContext())) RegParm = RegParmAttr->getNumParams(); unsigned PointerWidth = getContext().Target.getPointerWidth(0); |