diff options
Diffstat (limited to 'lib/CodeGen/CGDeclCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGDeclCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index d7d01847ea..ec3f38667b 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/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; } |