From: Chandler Carruth Date: Thu, 15 Jan 2015 10:42:26 +0000 (+0000) Subject: [PM] Track an LLVM API update which separates the TargetLibraryInfo X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=300dccaa4eecda67ed04b7bdc4bb158e1395c611;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226158 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 7adbdddf29..ec93bc80af 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/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);