diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-04-25 05:22:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-04-25 05:22:29 +0000 |
| commit | 21a7218c5f8909a7a8fefc856f298f401803535d (patch) | |
| tree | a24057730568a61a98b8659dc17fe7ac32e10448 | |
| parent | ba90675054e973d2360c1c54863bf3b867422cae (diff) | |
| download | bcm5719-llvm-21a7218c5f8909a7a8fefc856f298f401803535d.tar.gz bcm5719-llvm-21a7218c5f8909a7a8fefc856f298f401803535d.zip | |
Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine
llvm-svn: 5931
| -rw-r--r-- | llvm/tools/llc/llc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index fe1b89ff2d3..29daef75515 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -173,6 +173,7 @@ main(int argc, char **argv) assert(target.get() && "Could not allocate target machine!"); TargetMachine &Target = *target.get(); + const TargetData &TD = Target.getTargetData(); // Load the module to be compiled... std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename)); @@ -185,6 +186,10 @@ main(int argc, char **argv) // Build up all of the passes that we want to do to the module... PassManager Passes; + Passes.add(new TargetData("llc", TD.isLittleEndian(), TD.getSubWordDataSize(), + TD.getIntegerRegSize(), TD.getPointerSize(), + TD.getPointerAlignment())); + // Create a new optimization pass for each one specified on the command line // Deal specially with tracing passes, which must be run differently than opt. // |

