From 154fe9812faddcd94568a64aee5f3cb0d47003d9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 23 Dec 2009 22:04:40 +0000 Subject: There is no such thing as typeinfo for a cv-qualified type. Assert that this is true when mangling, then fix up the various places in Sema and/or CodeGen that need to remove qualifiers. Addresses a linking issue when building LLVM with Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprCXX.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExprCXX.cpp') diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index bfdff985cf..54e6b0141f 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -548,8 +548,10 @@ llvm::Value *CodeGenFunction::EmitDynamicCast(llvm::Value *V, assert(SrcTy->isRecordType() && "Src type must be record type!"); assert(DestTy->isRecordType() && "Dest type must be record type!"); - llvm::Value *SrcArg = CGM.GetAddrOfRTTIDescriptor(SrcTy); - llvm::Value *DestArg = CGM.GetAddrOfRTTIDescriptor(DestTy); + llvm::Value *SrcArg + = CGM.GetAddrOfRTTIDescriptor(SrcTy.getUnqualifiedType()); + llvm::Value *DestArg + = CGM.GetAddrOfRTTIDescriptor(DestTy.getUnqualifiedType()); V = Builder.CreateBitCast(V, PtrToInt8Ty); V = Builder.CreateCall4(CGM.CreateRuntimeFunction(FTy, "__dynamic_cast"), -- cgit v1.2.3