[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jun 15 16:15:01 PDT 2004
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.139 -> 1.140
---
Log message:
Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370: http://llvm.cs.uiuc.edu/PR370
---
Diffs of the changes: (+4 -1)
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.139 llvm/lib/VMCore/AsmWriter.cpp:1.140
--- llvm/lib/VMCore/AsmWriter.cpp:1.139 Wed Jun 9 17:22:10 2004
+++ llvm/lib/VMCore/AsmWriter.cpp Tue Jun 15 16:07:32 2004
@@ -1324,7 +1324,10 @@
// Return the slot number as the module's contribution to
// the type plane plus the index in the function's contribution
// to the type plane.
- return MI->second.next_slot + FVI->second;
+ if (MI != mMap.end())
+ return MI->second.next_slot + FVI->second;
+ else
+ return FVI->second;
}
}
}
More information about the llvm-commits
mailing list