r226158 - [PM] Track an LLVM API update which separates the TargetLibraryInfo

Chandler Carruth chandlerc at gmail.com
Thu Jan 15 02:42:34 PST 2015


Author: chandlerc
Date: Thu Jan 15 04:42:26 2015
New Revision: 226158

URL: http://llvm.org/viewvc/llvm-project?rev=226158&view=rev
Log:
[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.

Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=226158&r1=226157&r2=226158&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Thu Jan 15 04:42:26 2015
@@ -543,7 +543,8 @@ bool EmitAssemblyHelper::AddEmitPasses(B
 
   // Add LibraryInfo.
   llvm::Triple TargetTriple(TheModule->getTargetTriple());
-  PM->add(createTLI(TargetTriple, CodeGenOpts));
+  std::unique_ptr<TargetLibraryInfo> TLI(createTLI(TargetTriple, CodeGenOpts));
+  PM->add(new TargetLibraryInfoWrapperPass(*TLI));
 
   // Add Target specific analysis passes.
   TM->addAnalysisPasses(*PM);





More information about the cfe-commits mailing list