diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-10-19 20:10:10 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-10-19 20:10:10 +0000 |
commit | cbbe2c0fc0d28184d996ce29ae9f0fb36b4cf72f (patch) | |
tree | c6e22c1cdb499f78794b6cb17f5256edbce55445 /lib/CodeGen | |
parent | ef933cab028c13bda49768f570cf2330d9a57ca4 (diff) |
IRgen: Initialize TargetLoweringInfo with a triple.
- We create two TargetLoweringInfo instances for different pass managers, and
they weren't consistent (the one for codegen didn't have the right info). I'm
not sure this mattered anywhere in practice.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/BackendUtil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 262b844db3..6a665e3371 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -396,7 +396,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action, PassManager *PM = getCodeGenPasses(); // Add LibraryInfo. - TargetLibraryInfo *TLI = new TargetLibraryInfo(); + llvm::Triple TargetTriple(TheModule->getTargetTriple()); + TargetLibraryInfo *TLI = new TargetLibraryInfo(TargetTriple); if (!CodeGenOpts.SimplifyLibCalls) TLI->disableAllFunctions(); PM->add(TLI); |