aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-13 17:03:14 +0000
committerDevang Patel <dpatel@apple.com>2009-07-13 17:03:14 +0000
commitfe09eab8095da4d3a3c68441e1566671dc9568d3 (patch)
tree2d6d7c2503b88e9dc443ef665930a4e91ef4bde3 /lib/CodeGen/CGDebugInfo.cpp
parent0ae3d60731abb4c75eb9e993f8492527f4e51c70 (diff)
Update debug info type cache after fwd decl is replaced by real decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 9bab926977..3d7417df30 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -501,7 +501,9 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty,
// old decl with the new one. This will recursively update the debug info.
FwdDecl.getGV()->replaceAllUsesWith(RealDecl.getGV());
FwdDecl.getGV()->eraseFromParent();
-
+
+ // Update TypeCache.
+ TypeCache[QualType(Ty, 0).getAsOpaquePtr()] = RealDecl;
return RealDecl;
}
@@ -626,7 +628,9 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
// old decl with the new one. This will recursively update the debug info.
FwdDecl.getGV()->replaceAllUsesWith(RealDecl.getGV());
FwdDecl.getGV()->eraseFromParent();
-
+
+ // Update TypeCache.
+ TypeCache[QualType(Ty, 0).getAsOpaquePtr()] = RealDecl;
return RealDecl;
}