diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-23 15:42:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-23 15:42:55 +0000 |
commit | f3e8f97d7e8f9504f141c59c6ccfc088477839cb (patch) | |
tree | dc7e1af10243ca65a69501ae45171cb366f73b2b /llvm/tools/bugpoint/ExtractFunction.cpp | |
parent | c82fb1520e848c93a11364678e091954f9328b03 (diff) | |
download | bcm5719-llvm-f3e8f97d7e8f9504f141c59c6ccfc088477839cb.tar.gz bcm5719-llvm-f3e8f97d7e8f9504f141c59c6ccfc088477839cb.zip |
Fix an assertion failure in Bugpoint
llvm-svn: 9406
Diffstat (limited to 'llvm/tools/bugpoint/ExtractFunction.cpp')
-rw-r--r-- | llvm/tools/bugpoint/ExtractFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp index f031d34dec2..c65b482b01e 100644 --- a/llvm/tools/bugpoint/ExtractFunction.cpp +++ b/llvm/tools/bugpoint/ExtractFunction.cpp @@ -22,6 +22,7 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/Target/TargetData.h" #include "Support/CommandLine.h" bool DisableSimplifyCFG = false; @@ -72,6 +73,9 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I, // Spiff up the output a little bit. PassManager Passes; + // Make sure that the appropriate target data is always used... + Passes.add(new TargetData("bugpoint", Result)); + if (Simplification > 2 && !NoADCE) Passes.add(createAggressiveDCEPass()); // Remove dead code... //Passes.add(createInstructionCombiningPass()); @@ -104,6 +108,8 @@ Module *BugDriver::performFinalCleanups(Module *InM) const { I->setLinkage(GlobalValue::ExternalLinkage); PassManager CleanupPasses; + // Make sure that the appropriate target data is always used... + CleanupPasses.add(new TargetData("bugpoint", M)); CleanupPasses.add(createFunctionResolvingPass()); CleanupPasses.add(createGlobalDCEPass()); CleanupPasses.add(createDeadTypeEliminationPass()); |