diff options
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; } |

