diff options
author | John McCall <rjmccall@apple.com> | 2010-07-06 04:38:10 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-07-06 04:38:10 +0000 |
commit | 466e2210375026eacb9eb572341e170243bd2db2 (patch) | |
tree | 814d36c678db41197b23cc6a3fa565dd45f8fbe2 /clang/lib/CodeGen/CGDeclCXX.cpp | |
parent | c7c8c3d66b18669f8cdf0ad706be0438f721fdd0 (diff) | |
download | bcm5719-llvm-466e2210375026eacb9eb572341e170243bd2db2.tar.gz bcm5719-llvm-466e2210375026eacb9eb572341e170243bd2db2.zip |
When creating functions to run global initializers and destructors, mark them
as nounwind in -fno-exceptions. Fixes rdar://problem/8090834.
llvm-svn: 107639
Diffstat (limited to 'clang/lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index d7d01847ea4..ec3f38667b7 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -152,6 +152,9 @@ CreateGlobalInitOrDestructFunction(CodeGenModule &CGM, CGM.getContext().Target.getStaticInitSectionSpecifier()) Fn->setSection(Section); + if (!CGM.getLangOptions().Exceptions) + Fn->setDoesNotThrow(); + return Fn; } |