summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-22 18:57:00 +0000
committerDevang Patel <dpatel@apple.com>2009-07-22 18:57:00 +0000
commit06cceef54526918725668a8cf0c9ae3969f7e5ba (patch)
tree6f52f5e3c2a3463c15cd7cc39ce8c46aab7b4b6f /clang/lib
parente85806f0d14be6a32b38474e7ce2d21be83673dd (diff)
downloadbcm5719-llvm-06cceef54526918725668a8cf0c9ae3969f7e5ba.tar.gz
bcm5719-llvm-06cceef54526918725668a8cf0c9ae3969f7e5ba.zip
Use DICompositeType->replaceAllUsesWith().
This requires llvm rev. 76769 or higher. llvm-svn: 76770
Diffstat (limited to 'clang/lib')
-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 a2d7b023d4a..a8975dd6a27 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -432,7 +432,7 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *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());
@@ -506,14 +506,13 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *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);
// 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