summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-10-19 20:10:10 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-10-19 20:10:10 +0000
commitaa437df90a0f3d90c3be1b13408b0cd58354ca21 (patch)
treea5ea231f434bddba324d4742f7cbff895b80fd21 /clang/lib/CodeGen/BackendUtil.cpp
parent57cc6aff5e2cb1ac9ab76ee43cc920bf7fa508ec (diff)
downloadbcm5719-llvm-aa437df90a0f3d90c3be1b13408b0cd58354ca21.tar.gz
bcm5719-llvm-aa437df90a0f3d90c3be1b13408b0cd58354ca21.zip
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
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 262b844db34..6a665e3371b 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud