[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Feb 22 22:12:24 PST 2005
Changes in directory llvm/tools/bugpoint:
ExtractFunction.cpp updated: 1.41 -> 1.42
---
Log message:
Fix a bugpoint crash that JeffC noticed, looking like this:
*** Attempting to perform final cleanups: Final cleanups failed. Sorry. :( Ple
ase report a bug!
<llc>llc.exe: bytecode didn't read correctly.
llc.exe: bytecode didn't read correctly.
<crash>
Assertion failed: M && "You can't write a null module!!", file c:\llvm\lib\bytec
ode\writer\writer.cpp, line 1094
The fact that llc bombed (in this case) is ok, but bugpoint shouldn't crash after this.
---
Diffs of the changes: (+2 -1)
ExtractFunction.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.41 llvm/tools/bugpoint/ExtractFunction.cpp:1.42
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.41 Thu Nov 18 13:40:13 2004
+++ llvm/tools/bugpoint/ExtractFunction.cpp Wed Feb 23 00:12:11 2005
@@ -98,7 +98,7 @@
/// performFinalCleanups - This method clones the current Program and performs
/// a series of cleanups intended to get rid of extra cruft on the module
-/// before handing it to the user...
+/// before handing it to the user.
///
Module *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
// Make all functions external, so GlobalDCE doesn't delete them...
@@ -118,6 +118,7 @@
Module *New = runPassesOn(M, CleanupPasses);
if (New == 0) {
std::cerr << "Final cleanups failed. Sorry. :( Please report a bug!\n";
+ return M;
}
delete M;
return New;
More information about the llvm-commits
mailing list