as nounwind in -fno-exceptions. Fixes rdar://problem/
8090834.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107639
91177308-0d34-0410-b5e6-
96231b3b80d8
CGM.getContext().Target.getStaticInitSectionSpecifier())
Fn->setSection(Section);
+ if (!CGM.getLangOptions().Exceptions)
+ Fn->setDoesNotThrow();
+
return Fn;
}
-// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - |FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm -fexceptions %s -o - |FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm %s -o - |FileCheck -check-prefix NOEXC %s
struct A {
A();
// CHECK: define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
+// rdar://problem/8090834: this should be nounwind
+// CHECK-NOEXC: define internal void @_GLOBAL__I_a() nounwind section "__TEXT,__StaticInit,regular,pure_instructions" {