Fix extract to use the right TargetData, like Bugpoint does.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2003-10-28 22:22:16 +00:00
parent ad910ebe70
commit 204089042b
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Target/TargetData.h"
#include "Support/CommandLine.h"
#include <memory>
@ -52,6 +53,7 @@ int main(int argc, char **argv) {
// a little bit. Do this now.
//
PassManager Passes;
Passes.add(new TargetData("extract", M.get())); // Use correct TargetData
Passes.add(createFunctionExtractionPass(F)); // Extract the function
Passes.add(createGlobalDCEPass()); // Delete unreachable globals
Passes.add(createFunctionResolvingPass()); // Delete prototypes

View File

@ -17,6 +17,7 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Target/TargetData.h"
#include "Support/CommandLine.h"
#include <memory>
@ -52,6 +53,7 @@ int main(int argc, char **argv) {
// a little bit. Do this now.
//
PassManager Passes;
Passes.add(new TargetData("extract", M.get())); // Use correct TargetData
Passes.add(createFunctionExtractionPass(F)); // Extract the function
Passes.add(createGlobalDCEPass()); // Delete unreachable globals
Passes.add(createFunctionResolvingPass()); // Delete prototypes