[cfe-commits] r166299 - /cfe/trunk/lib/CodeGen/BackendUtil.cpp
Daniel Dunbar
daniel at zuster.org
Fri Oct 19 13:10:10 PDT 2012
Author: ddunbar
Date: Fri Oct 19 15:10:10 2012
New Revision: 166299
URL: http://llvm.org/viewvc/llvm-project?rev=166299&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/BackendUtil.cpp
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=166299&r1=166298&r2=166299&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Oct 19 15:10:10 2012
@@ -396,7 +396,8 @@
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);
More information about the cfe-commits
mailing list