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