diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-03-13 17:09:40 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-03-13 17:09:40 +0000 |
| commit | 31ad754c96673eefe89baf6994fe2c040f1b3dd7 (patch) | |
| tree | 76ac239f6c78c93339c8b1e1a6de24133ffb82af /clang/lib/CodeGen | |
| parent | 72216105433f8cde20b3314322cd6bb8e3a65ba1 (diff) | |
| download | bcm5719-llvm-31ad754c96673eefe89baf6994fe2c040f1b3dd7.tar.gz bcm5719-llvm-31ad754c96673eefe89baf6994fe2c040f1b3dd7.zip | |
Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.
llvm-svn: 127568
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index d72e6dc4295..15ab6b080be 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -709,7 +709,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, FuncAttrs |= llvm::Attribute::NoUnwind; else if (const FunctionDecl *Fn = dyn_cast<FunctionDecl>(TargetDecl)) { const FunctionProtoType *FPT = Fn->getType()->getAs<FunctionProtoType>(); - if (FPT && FPT->isNothrow()) + if (FPT && FPT->isNothrow(getContext())) FuncAttrs |= llvm::Attribute::NoUnwind; } diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index c9c8a6a35d7..32d1928b443 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -982,7 +982,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { // exception spec; for this part, we inline // CXXNewExpr::shouldNullCheckAllocation()) and we have an // interesting initializer. - bool nullCheck = allocatorType->isNothrow() && + bool nullCheck = allocatorType->isNothrow(getContext()) && !(allocType->isPODType() && !E->hasInitializer()); llvm::BasicBlock *nullCheckBB = 0; |

