aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGCall.cpp2
-rw-r--r--lib/CodeGen/CGException.cpp7
-rw-r--r--lib/CodeGen/CGExprCXX.cpp2
3 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 158e3a3a2c..d72e6dc429 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/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->hasEmptyExceptionSpec())
+ if (FPT && FPT->isNothrow())
FuncAttrs |= llvm::Attribute::NoUnwind;
}
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp
index 0b248bd783..f05bc700b4 100644
--- a/lib/CodeGen/CGException.cpp
+++ b/lib/CodeGen/CGException.cpp
@@ -449,9 +449,8 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) {
if (Proto == 0)
return;
- assert(!Proto->hasAnyExceptionSpec() && "function with parameter pack");
-
- if (!Proto->hasExceptionSpec())
+ // FIXME: What about noexcept?
+ if (!Proto->hasDynamicExceptionSpec())
return;
unsigned NumExceptions = Proto->getNumExceptions();
@@ -477,7 +476,7 @@ void CodeGenFunction::EmitEndEHSpec(const Decl *D) {
if (Proto == 0)
return;
- if (!Proto->hasExceptionSpec())
+ if (!Proto->hasDynamicExceptionSpec())
return;
EHStack.popFilter();
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp
index 0ca024059c..c9c8a6a35d 100644
--- a/lib/CodeGen/CGExprCXX.cpp
+++ b/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->hasNonThrowingExceptionSpec() &&
+ bool nullCheck = allocatorType->isNothrow() &&
!(allocType->isPODType() && !E->hasInitializer());
llvm::BasicBlock *nullCheckBB = 0;