diff options
author | Devang Patel <dpatel@apple.com> | 2009-11-16 20:09:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-11-16 20:09:38 +0000 |
commit | 10909d5faf668dd9ea1cd18414adb022de69d668 (patch) | |
tree | 07a200a5d2b8bc2997f1d7d94ba55684cd1ee148 /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | 9dc2d26fdc1150b35f7951bef4540c44fdee063f (diff) | |
download | bcm5719-llvm-10909d5faf668dd9ea1cd18414adb022de69d668.tar.gz bcm5719-llvm-10909d5faf668dd9ea1cd18414adb022de69d668.zip |
Use TrackingVH to hold forward decl.
llvm-svn: 88951
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 64748dc8f34..0cd8f1bcd8f 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -600,6 +600,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, if (Decl->isForwardDecl()) return FwdDecl; + llvm::TrackingVH<llvm::MDNode> FwdDeclNode = FwdDecl.getNode(); // Otherwise, insert it into the TypeCache so that recursive uses will find // it. TypeCache[QualType(Ty, 0).getAsOpaquePtr()] = FwdDecl.getNode(); @@ -686,7 +687,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, // Now that we have a real decl for the struct, replace anything using the // old decl with the new one. This will recursively update the debug info. - FwdDecl.replaceAllUsesWith(RealDecl); + llvm::DIDerivedType(FwdDeclNode).replaceAllUsesWith(RealDecl); return RealDecl; } |