From: David Chisnall Date: Tue, 20 Mar 2012 16:25:52 +0000 (+0000) Subject: Add missing bitcast that was breaking Objective-C++ exception typeinfo (GNUstep runtime). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=acd76fe8e1b1b3fd83dac66848041629a8b06e8a;p=clang Add missing bitcast that was breaking Objective-C++ exception typeinfo (GNUstep runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153090 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index 4dedc9de28..6f3e5dc574 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -933,7 +933,8 @@ llvm::Constant *CGObjCGNU::GetEHType(QualType T) { // Return the existing typeinfo if it exists llvm::Constant *typeinfo = TheModule.getGlobalVariable(typeinfoName); - if (typeinfo) return typeinfo; + if (typeinfo) + return llvm::ConstantExpr::getBitCast(typeinfo, PtrToInt8Ty); // Otherwise create it.