diff options
Diffstat (limited to 'llvm/tools/llc/llc.cpp')
-rw-r--r-- | llvm/tools/llc/llc.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index e33cd795d3a..c51c012391b 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -312,8 +312,7 @@ 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. - if (const DataLayout *DL = Target->getDataLayout()) - M->setDataLayout(*DL); + M->setDataLayout(Target->createDataLayout()); // Override function attributes based on CPUStr, FeaturesStr, and command line // flags. |