[cfe-commits] r89420 - /cfe/trunk/lib/CodeGen/CGException.cpp

Mike Stump mrs at apple.com
Thu Nov 19 16:44:03 PST 2009


Author: mrs
Date: Thu Nov 19 18:43:57 2009
New Revision: 89420

URL: http://llvm.org/viewvc/llvm-project?rev=89420&view=rev
Log:
Fix rtti generation for throws.  WIP.

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

Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=89420&r1=89419&r2=89420&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Thu Nov 19 18:43:57 2009
@@ -84,15 +84,7 @@
   
   // Now throw the exception.
   const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(getLLVMContext());
-  
-  llvm::SmallString<256> OutName;
-  llvm::raw_svector_ostream Out(OutName);
-  mangleCXXRtti(CGM.getMangleContext(), ThrowType, Out);
-  
-  // FIXME: Is it OK to use CreateRuntimeVariable for this?
-  llvm::Constant *TypeInfo = 
-    CGM.CreateRuntimeVariable(llvm::Type::getInt8Ty(getLLVMContext()),
-                              OutName.c_str());
+  llvm::Constant *TypeInfo = CGM.GenerateRtti(ThrowType);
   llvm::Constant *Dtor = llvm::Constant::getNullValue(Int8PtrTy);
   
   llvm::CallInst *ThrowCall = 





More information about the cfe-commits mailing list