[PATCH] D33467: Fix LLVM build errors if necent build of GCC 7 is used

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 14:56:09 PDT 2017


v.g.vassilev created this revision.
Herald added a subscriber: mehdi_amini.

Recent changes within GCC 7 libstdc++ caused build errors inside embedded LLVM.

Patch by David Abdurachmanov!


Repository:
  rL LLVM

https://reviews.llvm.org/D33467

Files:
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Instrumentation/PGOInstrumentation.cpp


Index: lib/Transforms/Instrumentation/PGOInstrumentation.cpp
===================================================================
--- lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -319,7 +319,7 @@
   PGOInstrumentationUseLegacyPass(std::string Filename = "")
       : ModulePass(ID), ProfileFileName(std::move(Filename)) {
     if (!PGOTestProfileFile.empty())
-      ProfileFileName = PGOTestProfileFile;
+      ProfileFileName = PGOTestProfileFile.getValue();
     initializePGOInstrumentationUseLegacyPassPass(
         *PassRegistry::getPassRegistry());
   }
@@ -1375,7 +1375,7 @@
 PGOInstrumentationUse::PGOInstrumentationUse(std::string Filename)
     : ProfileFileName(std::move(Filename)) {
   if (!PGOTestProfileFile.empty())
-    ProfileFileName = PGOTestProfileFile;
+    ProfileFileName = PGOTestProfileFile.getValue();
 }
 
 PreservedAnalyses PGOInstrumentationUse::run(Module &M,
Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -170,8 +170,8 @@
     MergeFunctions = false;
     PrepareForLTO = false;
     EnablePGOInstrGen = RunPGOInstrGen;
-    PGOInstrGen = PGOOutputFile;
-    PGOInstrUse = RunPGOInstrUse;
+    PGOInstrGen = RunPGOInstrGen.getValue();
+    PGOInstrUse = RunPGOInstrUse.getValue();
     PrepareForThinLTO = EnablePrepareForThinLTO;
     PerformThinLTO = false;
     DivergentTarget = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33467.100006.patch
Type: text/x-patch
Size: 1559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170523/fd661603/attachment.bin>


More information about the cfe-commits mailing list