From: Eric Christopher Date: Sat, 18 Feb 2012 00:50:08 +0000 (+0000) Subject: Remove UpdateCompletedType from the debug info emission. We now X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51b2f6bae6847ccf4c48960c925316dccfb10190;p=clang Remove UpdateCompletedType from the debug info emission. We now emit less than complete types on purpose on occasion and so our caches aren't useful for this kind of lazy emitting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150856 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 784e018be9..603594c39a 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2562,17 +2562,3 @@ CGDebugInfo::getOrCreateNameSpace(const NamespaceDecl *NSDecl) { NameSpaceCache[NSDecl] = llvm::WeakVH(NS); return NS; } - -/// UpdateCompletedType - Update type cache because the type is now -/// translated. -void CGDebugInfo::UpdateCompletedType(const TagDecl *TD) { - QualType Ty = CGM.getContext().getTagDeclType(TD); - - // If the type exist in type cache then remove it from the cache. - // There is no need to prepare debug info for the completed type - // right now. It will be generated on demand lazily. - llvm::DenseMap::iterator it = - TypeCache.find(Ty.getAsOpaquePtr()); - if (it != TypeCache.end()) - TypeCache.erase(it); -} diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 640026673b..1116336ca7 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -178,10 +178,6 @@ public: /// EmitFunctionEnd - Constructs the debug code for exiting a function. void EmitFunctionEnd(CGBuilderTy &Builder); - /// UpdateCompletedType - Update type cache because the type is now - /// translated. - void UpdateCompletedType(const TagDecl *TD); - /// EmitLexicalBlockStart - Emit metadata to indicate the beginning of a /// new lexical block and push the block onto the stack. void EmitLexicalBlockStart(CGBuilderTy &Builder, SourceLocation Loc); diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index f39e20741b..20efd85956 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -173,8 +173,6 @@ void CodeGenModule::Release() { void CodeGenModule::UpdateCompletedType(const TagDecl *TD) { // Make sure that this type is translated. Types.UpdateCompletedType(TD); - if (DebugInfo) - DebugInfo->UpdateCompletedType(TD); } llvm::MDNode *CodeGenModule::getTBAAInfo(QualType QTy) {