summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-11-20 00:43:57 +0000
committerMike Stump <mrs@apple.com>2009-11-20 00:43:57 +0000
commit18fc44dfd376b8af8768d02510db3f88395e528f (patch)
treeb234679948657e4d2460d8248ea4857b8d76bd08 /clang/lib
parent01956f5a6b3f753df31fffe4c1494e03164239fe (diff)
downloadbcm5719-llvm-18fc44dfd376b8af8768d02510db3f88395e528f.tar.gz
bcm5719-llvm-18fc44dfd376b8af8768d02510db3f88395e528f.zip
Fix rtti generation for throws. WIP.
llvm-svn: 89420
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGException.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index adfd0055f93..93f3eb9f7c5 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 =
OpenPOWER on IntegriCloud