From a9711a9aa493762b6ea647717bed0cf092fbb68a Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 15 Jan 2015 10:42:26 +0000 Subject: [PATCH] [PM] Track an LLVM API update which separates the TargetLibraryInfo object from the pass that provides access to it. We should probably refactor the createTLI code here in Clang in light of the new structure, but I wanted this patch to be a minimal one that just patches the behavior back together. llvm-svn: 226158 --- clang/lib/CodeGen/BackendUtil.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 7adbddd..ec93bc8 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -543,7 +543,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action, // Add LibraryInfo. llvm::Triple TargetTriple(TheModule->getTargetTriple()); - PM->add(createTLI(TargetTriple, CodeGenOpts)); + std::unique_ptr TLI(createTLI(TargetTriple, CodeGenOpts)); + PM->add(new TargetLibraryInfoWrapperPass(*TLI)); // Add Target specific analysis passes. TM->addAnalysisPasses(*PM); -- 2.7.4