1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

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.

llvm-svn: 20285
This commit is contained in:
Chris Lattner 2005-02-23 06:12:11 +00:00
parent 9838ab1271
commit 10b250cb01

View File

@ -98,7 +98,7 @@ static const PassInfo *getPI(Pass *P) {
/// 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 *BugDriver::performFinalCleanups(Module *M, bool MayModifySemantics) {
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;