[llvm-commits] CVS: llvm/tools/bugpoint/CodeGeneratorBug.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 4 00:04:12 PDT 2003
Changes in directory llvm/tools/bugpoint:
CodeGeneratorBug.cpp updated: 1.9 -> 1.10
---
Log message:
Fix problem I introduced in bugpoint with the cleanup functions
---
Diffs of the changes:
Index: llvm/tools/bugpoint/CodeGeneratorBug.cpp
diff -u llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.9 llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.10
--- llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.9 Fri Aug 1 17:13:58 2003
+++ llvm/tools/bugpoint/CodeGeneratorBug.cpp Sun Aug 3 17:29:43 2003
@@ -172,10 +172,6 @@
abort();
}
- // Clean up the modules, removing extra cruft that we don't need anymore...
- SafeModule = BD.performFinalCleanups(SafeModule);
- TestModule = BD.performFinalCleanups(TestModule);
-
DEBUG(std::cerr << "Safe module:\n";
typedef Module::iterator MI;
typedef Module::giterator MGI;
@@ -200,10 +196,6 @@
exit(1);
}
- // Make a shared library
- std::string SharedObject;
- BD.compileSharedObject(SafeModuleBC, SharedObject);
-
// Remove all functions from the Test module EXCEPT for the ones specified in
// Funcs. We know which ones these are because they are non-external in
// ToOptimize, but external in ToNotOptimize.
@@ -222,10 +214,19 @@
std::cerr << "Bytecode file corrupted!\n";
exit(1);
}
+
+ // Clean up the modules, removing extra cruft that we don't need anymore...
+ SafeModule = BD.performFinalCleanups(SafeModule);
+ TestModule = BD.performFinalCleanups(TestModule);
+
if (BD.writeProgramToFile(TestModuleBC, TestModule)) {
std::cerr << "Error writing bytecode to `" << SafeModuleBC << "'\nExiting.";
exit(1);
}
+
+ // Make a shared library
+ std::string SharedObject;
+ BD.compileSharedObject(SafeModuleBC, SharedObject);
delete SafeModule;
delete TestModule;
More information about the llvm-commits
mailing list