]> granicus.if.org Git - clang/commitdiff
Remove UpdateCompletedType from the debug info emission. We now
authorEric Christopher <echristo@apple.com>
Sat, 18 Feb 2012 00:50:08 +0000 (00:50 +0000)
committerEric Christopher <echristo@apple.com>
Sat, 18 Feb 2012 00:50:08 +0000 (00:50 +0000)
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

lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h
lib/CodeGen/CodeGenModule.cpp

index 784e018be993c8a039207858658be6218198df19..603594c39af030363c4c007d56d8cfd37142126d 100644 (file)
@@ -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<void *, llvm::WeakVH>::iterator it =
-    TypeCache.find(Ty.getAsOpaquePtr());
-  if (it != TypeCache.end()) 
-    TypeCache.erase(it);
-}
index 640026673b38d4906bb62e5ca23b62a1bcec4779..1116336ca76bb239063b934adb75ca90992532ba 100644 (file)
@@ -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);
index f39e20741b84920f723c9d69d63b7a4223752523..20efd859563bba33ae700594a76734212fd81544 100644 (file)
@@ -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) {