diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 5 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index e1b63423496..b2f3120ec38 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index 72a9d71d79f..4603b9c6060 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/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/clang/lib/CodeGen/CodeGenTypes.cpp b/clang/lib/CodeGen/CodeGenTypes.cpp index 6ebb418e5ef..88a1393a68f 100644 --- a/clang/lib/CodeGen/CodeGenTypes.cpp +++ b/clang/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, |