projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Remove access to the DataLayout in the TargetMachine"
[oota-llvm.git]
/
tools
/
llc
/
llc.cpp
diff --git
a/tools/llc/llc.cpp
b/tools/llc/llc.cpp
index c51c012391b2e6fe422df4cc797653779a55cce9..e33cd795d3ae2d01b2fe708ad6e8c70d6779d16a 100644
(file)
--- a/
tools/llc/llc.cpp
+++ b/
tools/llc/llc.cpp
@@
-312,7
+312,8
@@
static int compileModule(char **argv, LLVMContext &Context) {
PM.add(new TargetLibraryInfoWrapperPass(TLII));
// Add the target data from the target machine, if it exists, or the module.
PM.add(new TargetLibraryInfoWrapperPass(TLII));
// Add the target data from the target machine, if it exists, or the module.
- M->setDataLayout(Target->createDataLayout());
+ if (const DataLayout *DL = Target->getDataLayout())
+ M->setDataLayout(*DL);
// Override function attributes based on CPUStr, FeaturesStr, and command line
// flags.
// Override function attributes based on CPUStr, FeaturesStr, and command line
// flags.