From: Anders Carlsson Date: Sun, 20 Mar 2011 20:52:32 +0000 (+0000) Subject: __cxa_atexit does not throw. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd4a0732f2f261f8269a71c2090bc3e9d001eca6;p=clang __cxa_atexit does not throw. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127977 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDeclCXX.cpp b/lib/CodeGen/CGDeclCXX.cpp index ed25b6db38..cb1c8ed192 100644 --- a/lib/CodeGen/CGDeclCXX.cpp +++ b/lib/CodeGen/CGDeclCXX.cpp @@ -138,6 +138,8 @@ CodeGenFunction::EmitCXXGlobalDtorRegistration(llvm::Constant *DtorFn, llvm::Constant *AtExitFn = CGM.CreateRuntimeFunction(AtExitFnTy, "__cxa_atexit"); + if (llvm::Function *Fn = dyn_cast(AtExitFn)) + Fn->setDoesNotThrow(); llvm::Constant *Handle = CGM.CreateRuntimeVariable(Int8PtrTy, "__dso_handle");