r226982 - [PM] Update Clang to reflect the TLI API change in LLVM r226981.

Chandler Carruth chandlerc at gmail.com
Fri Jan 23 18:25:21 PST 2015


Author: chandlerc
Date: Fri Jan 23 20:25:21 2015
New Revision: 226982

URL: http://llvm.org/viewvc/llvm-project?rev=226982&view=rev
Log:
[PM] Update Clang to reflect the TLI API change in LLVM r226981.

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=226982&r1=226981&r2=226982&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Jan 23 20:25:21 2015
@@ -227,12 +227,12 @@ static void addDataFlowSanitizerPass(con
   PM.add(createDataFlowSanitizerPass(LangOpts.SanitizerBlacklistFile));
 }
 
-static TargetLibraryInfo *createTLI(llvm::Triple &TargetTriple,
-                                    const CodeGenOptions &CodeGenOpts) {
-  TargetLibraryInfo *TLI = new TargetLibraryInfo(TargetTriple);
+static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,
+                                         const CodeGenOptions &CodeGenOpts) {
+  TargetLibraryInfoImpl *TLII = new TargetLibraryInfoImpl(TargetTriple);
   if (!CodeGenOpts.SimplifyLibCalls)
-    TLI->disableAllFunctions();
-  return TLI;
+    TLII->disableAllFunctions();
+  return TLII;
 }
 
 static void addSymbolRewriterPass(const CodeGenOptions &Opts,
@@ -331,7 +331,7 @@ void EmitAssemblyHelper::CreatePasses()
 
   // Figure out TargetLibraryInfo.
   Triple TargetTriple(TheModule->getTargetTriple());
-  PMBuilder.LibraryInfo = createTLI(TargetTriple, CodeGenOpts);
+  PMBuilder.LibraryInfo = createTLII(TargetTriple, CodeGenOpts);
 
   switch (Inlining) {
   case CodeGenOptions::NoInlining: break;
@@ -543,8 +543,9 @@ bool EmitAssemblyHelper::AddEmitPasses(B
 
   // Add LibraryInfo.
   llvm::Triple TargetTriple(TheModule->getTargetTriple());
-  std::unique_ptr<TargetLibraryInfo> TLI(createTLI(TargetTriple, CodeGenOpts));
-  PM->add(new TargetLibraryInfoWrapperPass(*TLI));
+  std::unique_ptr<TargetLibraryInfoImpl> TLII(
+      createTLII(TargetTriple, CodeGenOpts));
+  PM->add(new TargetLibraryInfoWrapperPass(*TLII));
 
   // Add Target specific analysis passes.
   TM->addAnalysisPasses(*PM);





More information about the cfe-commits mailing list