summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-27 18:42:03 +0000
committerDevang Patel <dpatel@apple.com>2009-07-27 18:42:03 +0000
commit6a3b3fe98a04d9e761d833735037c45b8472e286 (patch)
treedf8de7f185b2832c21c966930da18a5b7b80a195 /clang
parent18688f431d75fd8c370b46edea0da5091583f5fe (diff)
downloadbcm5719-llvm-6a3b3fe98a04d9e761d833735037c45b8472e286.tar.gz
bcm5719-llvm-6a3b3fe98a04d9e761d833735037c45b8472e286.zip
Use DICompositeType->replaceAllUsesWith()
llvm-svn: 77228
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index a8975dd6a27..ee2a94067d3 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -543,7 +543,7 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
// its members. Finally, we create a descriptor for the complete type (which
// may refer to the forward decl if the struct is recursive) and replace all
// uses of the forward declaration with the final definition.
- llvm::DIType FwdDecl =
+ llvm::DICompositeType FwdDecl =
DebugFactory.CreateCompositeType(Tag, Unit, Name, DefUnit, Line, 0, 0, 0, 0,
llvm::DIType(), llvm::DIArray(),
RuntimeLang);
@@ -631,15 +631,14 @@ llvm::DIType CGDebugInfo::CreateType(const ObjCInterfaceType *Ty,
uint64_t Size = M->getContext().getTypeSize(Ty);
uint64_t Align = M->getContext().getTypeAlign(Ty);
- llvm::DIType RealDecl =
+ llvm::DICompositeType RealDecl =
DebugFactory.CreateCompositeType(Tag, Unit, Name, DefUnit, Line, Size,
Align, 0, 0, llvm::DIType(), Elements,
RuntimeLang);
// 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.getGV()->replaceAllUsesWith(RealDecl.getGV());
- FwdDecl.getGV()->eraseFromParent();
+ FwdDecl.replaceAllUsesWith(RealDecl);
// Update TypeCache.
TypeCache[QualType(Ty, 0).getAsOpaquePtr()] = RealDecl;
OpenPOWER on IntegriCloud