mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 01:43:57 +00:00
Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine llvm-svn: 5931
This commit is contained in:
parent
b72c6d38da
commit
5efddeb447
@ -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.
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user