[cfe-commits] r127977 - /cfe/trunk/lib/CodeGen/CGDeclCXX.cpp

Anders Carlsson andersca at mac.com
Sun Mar 20 13:52:32 PDT 2011


Author: andersca
Date: Sun Mar 20 15:52:32 2011
New Revision: 127977

URL: http://llvm.org/viewvc/llvm-project?rev=127977&view=rev
Log:
__cxa_atexit does not throw.

Modified:
    cfe/trunk/lib/CodeGen/CGDeclCXX.cpp

Modified: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDeclCXX.cpp?rev=127977&r1=127976&r2=127977&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp Sun Mar 20 15:52:32 2011
@@ -138,6 +138,8 @@
 
   llvm::Constant *AtExitFn = CGM.CreateRuntimeFunction(AtExitFnTy,
                                                        "__cxa_atexit");
+  if (llvm::Function *Fn = dyn_cast<llvm::Function>(AtExitFn))
+    Fn->setDoesNotThrow();
 
   llvm::Constant *Handle = CGM.CreateRuntimeVariable(Int8PtrTy,
                                                      "__dso_handle");





More information about the cfe-commits mailing list