diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-24 19:13:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-24 19:13:02 +0000 |
commit | 9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf (patch) | |
tree | f64a1dd3de118ebd44058ff06e24e9095c20e8bb /tools/gccas/gccas.cpp | |
parent | 53a0c38b5fdb45974b74373ab17bf4d2fa27e292 (diff) |
Make sure to create a target data that matches the Module's target properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccas/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 043b0d2a82..273e071ad2 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -66,8 +66,8 @@ void AddConfiguredTransformationPasses(PassManager &PM) { addPass(PM, createGlobalDCEPass()); // Kill unused uinit g-vars addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types addPass(PM, createConstantMergePass()); // Merge dup global constants - addPass(PM, createVerifierPass()); // Verify that input is correct addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs + addPass(PM, createVerifierPass()); // Verify that input is correct addPass(PM, createDeadInstEliminationPass()); // Remove Dead code/vars addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst addPass(PM, createIndVarSimplifyPass()); // Simplify indvars @@ -145,6 +145,9 @@ int main(int argc, char **argv) { // PassManager Passes; + // Add an appropriate TargetData instance for this module... + Passes.add(new TargetData("gccas", M.get())); + // Add all of the transformation passes to the pass manager to do the cleanup // and optimization of the GCC output. // |