forked from OSchip/llvm-project
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:
parent
57cc6aff5e
commit
aa437df90a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue