mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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:
parent
ad910ebe70
commit
204089042b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user