[llvm-commits] [llvm-gcc-4.2] r76887 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Devang Patel
dpatel at apple.com
Thu Jul 23 11:01:46 PDT 2009
Author: dpatel
Date: Thu Jul 23 13:01:27 2009
New Revision: 76887
URL: http://llvm.org/viewvc/llvm-project?rev=76887&view=rev
Log:
Use DICompositeType.replaceAllUsesWith().
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=76887&r1=76886&r2=76887&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Thu Jul 23 13:01:27 2009
@@ -575,7 +575,7 @@
// recursive) and replace all uses of the forward declaration with the
// final definition.
expanded_location Loc = GetNodeLocation(TREE_CHAIN(type), false);
- llvm::DIType FwdDecl =
+ llvm::DICompositeType FwdDecl =
DebugFactory.CreateCompositeType(Tag,
findRegion(type),
GetNodeName(type),
@@ -684,7 +684,7 @@
llvm::DIArray Elements =
DebugFactory.GetOrCreateArray(EltTys.data(), EltTys.size());
- llvm::DIType RealDecl =
+ llvm::DICompositeType RealDecl =
DebugFactory.CreateCompositeType(Tag, findRegion(type),
GetNodeName(type),
getOrCreateCompileUnit(Loc.file),
@@ -695,8 +695,7 @@
// 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);
return RealDecl;
}
More information about the llvm-commits
mailing list