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.

llvm-svn: 166299
This commit is contained in:
Daniel Dunbar 2012-10-19 20:10:10 +00:00
parent 57cc6aff5e
commit aa437df90a
1 changed files with 2 additions and 1 deletions

View File

@ -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);