From: David Blaikie Date: Fri, 21 Jun 2013 00:59:44 +0000 (+0000) Subject: Fix all the silly things I committed in r184509 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=076f51fd1f306cafc3b1f1d323d25ac81bf7d4f7;p=clang Fix all the silly things I committed in r184509 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184512 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index e1b6342349..b2f3120ec3 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1916,10 +1916,11 @@ void CGDebugInfo::completeFwdDecl(const RecordDecl &RD) { if (DebugKind <= CodeGenOptions::LimitedDebugInfo) return; - llvm::DIType T = getTypeOrNull(CGM.getContext().getRecordType(&RD)); + QualType QTy = CGM.getContext().getRecordType(&RD); + llvm::DIType T = getTypeOrNull(QTy); if (T.Verify() && T.isForwardDecl()) - getOrCreateType(QTy, getOrCreateFile(RD.getLocation()); + getOrCreateType(QTy, getOrCreateFile(RD.getLocation())); } /// getCachedInterfaceTypeOrNull - Get the type from the interface diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 72a9d71d79..4603b9c606 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -289,7 +289,7 @@ public: llvm::DIType getOrCreateInterfaceType(QualType Ty, SourceLocation Loc); - void completeFwdDecls(const RecordDecl *TD); + void completeFwdDecl(const RecordDecl &TD); private: /// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration. diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index 6ebb418e5e..88a1393a68 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -264,7 +264,7 @@ void CodeGenTypes::UpdateCompletedType(const TagDecl *TD) { // If necessary, provide the full definition of a type only used with a // declaration so far. if (CGDebugInfo *DI = CGM.getModuleDebugInfo()) - DI->completeFwdDecls(RD); + DI->completeFwdDecl(*RD); } static llvm::Type *getTypeForFormat(llvm::LLVMContext &VMContext,