From 18fc44dfd376b8af8768d02510db3f88395e528f Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Fri, 20 Nov 2009 00:43:57 +0000 Subject: [PATCH] Fix rtti generation for throws. WIP. llvm-svn: 89420 --- clang/lib/CodeGen/CGException.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index adfd0055f936..93f3eb9f7c5a 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -84,15 +84,7 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) { // 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 =