[llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri May 28 00:51:03 PDT 2004
Changes in directory llvm/lib/Target/CBackend:
Writer.cpp updated: 1.179 -> 1.180
---
Log message:
Fix the big regression that has been killing the nightly tester these last
few days. Apparently the old symbol table used to auto rename collisions in
the type symbol table and the new one does not. It doesn't really make sense
for the new one to do so, so we just make the client do it.
---
Diffs of the changes: (+3 -1)
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.179 llvm/lib/Target/CBackend/Writer.cpp:1.180
--- llvm/lib/Target/CBackend/Writer.cpp:1.179 Fri May 28 00:30:51 2004
+++ llvm/lib/Target/CBackend/Writer.cpp Fri May 28 00:47:27 2004
@@ -236,10 +236,12 @@
// structure types.
//
bool Changed = false;
+ unsigned RenameCounter = 0;
for (std::set<const Type *>::const_iterator I = UT.begin(), E = UT.end();
I != E; ++I)
if (const StructType *ST = dyn_cast<StructType>(*I)) {
- const_cast<StructType*>(ST)->setName("unnamed", &MST);
+ while (M.addTypeName("unnamed"+utostr(RenameCounter), ST))
+ ++RenameCounter;
Changed = true;
}
return Changed;
More information about the llvm-commits
mailing list