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

2017-12-06 Thread Guilherme Amadio via Phabricator via cfe-commits
amadio added a comment.

The problems fixed here also happen when compiling with Clang-5.0 and C++17 
enabled. What happens is that the assignment to `ProfileFileName` needs a 
conversion of `PGOTestProfileFile` from the `opt` type to `std::string`, but 
the compiler is trying to use a deleted constructor of `opt` instead:

  include/llvm/Support/CommandLine.h:1296:3: note: declared here
 opt(const opt &) = delete;

An alternative way of fixing this, which I have used in ROOT is to write 
`ProfileFileName = StringRef(PGOTestProfileFile);` to help the compiler 
understand what is going on.


Repository:
  rL LLVM

https://reviews.llvm.org/D33467



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-06-13 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment.

Waiting on resolution to: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79162


Repository:
  rL LLVM

https://reviews.llvm.org/D33467



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-06-09 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment.

This is a libstdc++ bug: https://gcc.gnu.org/PR79162 (They implemented a 
speculative fix for a different issue and ended up breaking this case.)

I think for now we should say we don't support building LLVM with libstdc++7.1 
in C++17 mode.


Repository:
  rL LLVM

https://reviews.llvm.org/D33467



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-06-09 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a reviewer: rsmith.
v.g.vassilev added a subscriber: rsmith.
v.g.vassilev added a comment.

@rsmith, what's the right way to proceed here?


Repository:
  rL LLVM

https://reviews.llvm.org/D33467



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2017-05-26 Thread Richard Smith via cfe-commits
This definitely looks like a GCC bug.

On 26 May 2017 1:34 am, "David Abdurachmanov via Phabricator via
cfe-commits"  wrote:

davidlt added a comment.

This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in
C++1z mode.

  FAILED: /home/davidlt/root_patch_check/a/slc7_ppc64le_gcc700/
external/gcc/7.0.0-njopjo2/bin/g++   -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Iinterpreter/llvm/src/lib/Transforms/Instrumentation
-I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation
-Iinterpreter/llvm/src/include -I/home/davidlt/root_patch_
check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-
6.09.04/interpreter/llvm/src/include -D__ROOFIT_NOBANNER
-Wno-implicit-fallthrough -Wno-noexcept-type -pipe   -Wshadow -Wall -W
-Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++1z
-fvisibility=hidden -fPIC -fvisibility-inlines-hidden -w -Werror=date-time
-std=c++1z -ffunction-sections -fdata-sections -O2 -DNDEBUG
-fno-exceptions -fno-rtti -MD -MT interpreter/llvm/src/lib/
Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
-MF interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/
LLVMInstrumentation.dir/PGOInstrumentation.cpp.o.d -o
interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/
LLVMInstrumentation.dir/PGOInstrumentation.cpp.o -c
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/
Instrumentation/PGOInstrumentation.cpp
  /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/
Instrumentation/PGOInstrumentation.cpp: In constructor '{anonymous}::
PGOInstrumentationUseLegacyPass::PGOInstrumentationUseLegacyPas
s(std::string)':
  /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/
Instrumentation/PGOInstrumentation.cpp:155:25: error:
'llvm::cl::opt::opt(const
llvm::cl::opt&) [with DataType =
std::basic_string; bool ExternalStorage = false; ParserClass =
llvm::cl::parser]' is private within this context
 ProfileFileName = PGOTestProfileFile;
   ^~
  In file included from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/Support/Options.h:41:0,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/LLVMContext.h:19,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/Metadata.h:26,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/TrackingMDRef.h:17,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/DebugLoc.h:18,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/Instruction.h:20,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/BasicBlock.h:19,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/Function.h:24,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/IR/PassManager.h:44,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/Transforms/PGOInstrumentation.h:17,
   from /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/
Instrumentation/PGOInstrumentation.cpp:51:
  /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_
gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/
include/llvm/Support/CommandLine.h:1296:3: note: declared private here
 opt(const opt &) = delete;
 ^~~


This is wrong. We have a "public:" on the previous line! But I think this
is just GCC's diagnostic being screwed up and what it's trying to say is
that it selected a deleted function.

But this function is the wrong overload resolution result; the operator
std::string from the base class should be selected.

  /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_

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

2017-05-26 Thread David Abdurachmanov via cfe-commits
Just reminder that this is in C++1z (C++17) mode, which I doubt is being widely 
used at this point.

I was a change a few months ago that caused it, but cannot recall exact commit 
in GCC.

david

> On 26 May 2017, at 10:43, Chandler Carruth  wrote:
> 
> I kind of think this may be a GCC bug. It is quite strange that no one else 
> has reported it, and that you're only seeing it in this context. We have many 
> std::string flags and they are used in this way pretty commonly.
> 
> I'm not seeing this with any other GCC-hosted build bot either, including a 
> PPC one here: http://lab.llvm.org:8011/builders/clang-ppc64le-linux 
> 
> On Fri, May 26, 2017 at 1:34 AM David Abdurachmanov via Phabricator 
> > wrote:
> davidlt added a comment.
> 
> This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in 
> C++1z mode.
> 
>   FAILED: 
> /home/davidlt/root_patch_check/a/slc7_ppc64le_gcc700/external/gcc/7.0.0-njopjo2/bin/g++
>-DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
> -Iinterpreter/llvm/src/lib/Transforms/Instrumentation 
> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation
>  -Iinterpreter/llvm/src/include 
> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include
>  -D__ROOFIT_NOBANNER -Wno-implicit-fallthrough -Wno-noexcept-type -pipe   
> -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread 
> -std=c++1z -fvisibility=hidden -fPIC -fvisibility-inlines-hidden -w 
> -Werror=date-time -std=c++1z -ffunction-sections -fdata-sections -O2 -DNDEBUG 
>-fno-exceptions -fno-rtti -MD -MT 
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
>  -MF 
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o.d
>  -o 
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
>  -c 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
>   
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:
>  In constructor 
> '{anonymous}::PGOInstrumentationUseLegacyPass::PGOInstrumentationUseLegacyPass(std::string)':
>   
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:155:25:
>  error: 'llvm::cl::opt::opt(const 
> llvm::cl::opt&) [with DataType = 
> std::basic_string; bool ExternalStorage = false; ParserClass = 
> llvm::cl::parser]' is private within this context
>  ProfileFileName = PGOTestProfileFile;
>^~
>   In file included from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/Options.h:41:0,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/LLVMContext.h:19,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Metadata.h:26,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/TrackingMDRef.h:17,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/DebugLoc.h:18,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Instruction.h:20,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/BasicBlock.h:19,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Function.h:24,
>from 
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/PassManager.h:44,
>from 
> 

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

2017-05-26 Thread Chandler Carruth via cfe-commits
Maybe Richard would be a better one to explain what on earth is going on
here then...

On Fri, May 26, 2017 at 1:51 AM David Abdurachmanov <
david.abdurachma...@gmail.com> wrote:

> Just reminder that this is in C++1z (C++17) mode, which I doubt is being
> widely used at this point.
>
> I was a change a few months ago that caused it, but cannot recall exact
> commit in GCC.
>
> david
>
> On 26 May 2017, at 10:43, Chandler Carruth  wrote:
>
> I kind of think this may be a GCC bug. It is quite strange that no one
> else has reported it, and that you're only seeing it in this context. We
> have many std::string flags and they are used in this way pretty commonly.
>
> I'm not seeing this with any other GCC-hosted build bot either, including
> a PPC one here: http://lab.llvm.org:8011/builders/clang-ppc64le-linux
>
> On Fri, May 26, 2017 at 1:34 AM David Abdurachmanov via Phabricator <
> revi...@reviews.llvm.org> wrote:
>
>> davidlt added a comment.
>>
>> This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in
>> C++1z mode.
>>
>>   FAILED:
>> /home/davidlt/root_patch_check/a/slc7_ppc64le_gcc700/external/gcc/7.0.0-njopjo2/bin/g++
>>  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
>> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
>> -Iinterpreter/llvm/src/lib/Transforms/Instrumentation
>> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation
>> -Iinterpreter/llvm/src/include
>> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include
>> -D__ROOFIT_NOBANNER -Wno-implicit-fallthrough -Wno-noexcept-type -pipe
>>  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread
>> -std=c++1z -fvisibility=hidden -fPIC -fvisibility-inlines-hidden -w
>> -Werror=date-time -std=c++1z -ffunction-sections -fdata-sections -O2
>> -DNDEBUG-fno-exceptions -fno-rtti -MD -MT
>> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
>> -MF
>> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o.d
>> -o
>> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
>> -c
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
>>
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:
>> In constructor
>> '{anonymous}::PGOInstrumentationUseLegacyPass::PGOInstrumentationUseLegacyPass(std::string)':
>>
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:155:25:
>> error: 'llvm::cl::opt::opt(const
>> llvm::cl::opt&) [with DataType =
>> std::basic_string; bool ExternalStorage = false; ParserClass =
>> llvm::cl::parser]' is private within this context
>>  ProfileFileName = PGOTestProfileFile;
>>^~
>>   In file included from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/Options.h:41:0,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/LLVMContext.h:19,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Metadata.h:26,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/TrackingMDRef.h:17,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/DebugLoc.h:18,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Instruction.h:20,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/BasicBlock.h:19,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Function.h:24,
>>from
>> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/PassManager.h:44,
>>from
>> 

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

2017-05-26 Thread Chandler Carruth via cfe-commits
I kind of think this may be a GCC bug. It is quite strange that no one else
has reported it, and that you're only seeing it in this context. We have
many std::string flags and they are used in this way pretty commonly.

I'm not seeing this with any other GCC-hosted build bot either, including a
PPC one here: http://lab.llvm.org:8011/builders/clang-ppc64le-linux

On Fri, May 26, 2017 at 1:34 AM David Abdurachmanov via Phabricator <
revi...@reviews.llvm.org> wrote:

> davidlt added a comment.
>
> This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in
> C++1z mode.
>
>   FAILED:
> /home/davidlt/root_patch_check/a/slc7_ppc64le_gcc700/external/gcc/7.0.0-njopjo2/bin/g++
>  -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS
> -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
> -Iinterpreter/llvm/src/lib/Transforms/Instrumentation
> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation
> -Iinterpreter/llvm/src/include
> -I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include
> -D__ROOFIT_NOBANNER -Wno-implicit-fallthrough -Wno-noexcept-type -pipe
>  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread
> -std=c++1z -fvisibility=hidden -fPIC -fvisibility-inlines-hidden -w
> -Werror=date-time -std=c++1z -ffunction-sections -fdata-sections -O2
> -DNDEBUG-fno-exceptions -fno-rtti -MD -MT
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
> -MF
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o.d
> -o
> interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
> -c
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
>
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:
> In constructor
> '{anonymous}::PGOInstrumentationUseLegacyPass::PGOInstrumentationUseLegacyPass(std::string)':
>
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:155:25:
> error: 'llvm::cl::opt::opt(const
> llvm::cl::opt&) [with DataType =
> std::basic_string; bool ExternalStorage = false; ParserClass =
> llvm::cl::parser]' is private within this context
>  ProfileFileName = PGOTestProfileFile;
>^~
>   In file included from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/Options.h:41:0,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/LLVMContext.h:19,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Metadata.h:26,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/TrackingMDRef.h:17,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/DebugLoc.h:18,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Instruction.h:20,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/BasicBlock.h:19,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Function.h:24,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/PassManager.h:44,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Transforms/PGOInstrumentation.h:17,
>from
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:51:
>
> /home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/CommandLine.h:1296:3:
> note: declared private here
>  opt(const opt &) = 

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

2017-05-26 Thread David Abdurachmanov via Phabricator via cfe-commits
davidlt added a comment.

This happens with recent GCC 7.1.1 (updated yesterday) and if compiled in C++1z 
mode.

  FAILED: 
/home/davidlt/root_patch_check/a/slc7_ppc64le_gcc700/external/gcc/7.0.0-njopjo2/bin/g++
   -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-Iinterpreter/llvm/src/lib/Transforms/Instrumentation 
-I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation
 -Iinterpreter/llvm/src/include 
-I/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include
 -D__ROOFIT_NOBANNER -Wno-implicit-fallthrough -Wno-noexcept-type -pipe   
-Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++1z 
-fvisibility=hidden -fPIC -fvisibility-inlines-hidden -w -Werror=date-time 
-std=c++1z -ffunction-sections -fdata-sections -O2 -DNDEBUG-fno-exceptions 
-fno-rtti -MD -MT 
interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
 -MF 
interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o.d
 -o 
interpreter/llvm/src/lib/Transforms/Instrumentation/CMakeFiles/LLVMInstrumentation.dir/PGOInstrumentation.cpp.o
 -c 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
  
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:
 In constructor 
'{anonymous}::PGOInstrumentationUseLegacyPass::PGOInstrumentationUseLegacyPass(std::string)':
  
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:155:25:
 error: 'llvm::cl::opt::opt(const 
llvm::cl::opt&) [with DataType = 
std::basic_string; bool ExternalStorage = false; ParserClass = 
llvm::cl::parser]' is private within this context
 ProfileFileName = PGOTestProfileFile;
   ^~
  In file included from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/Options.h:41:0,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/LLVMContext.h:19,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Metadata.h:26,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/TrackingMDRef.h:17,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/DebugLoc.h:18,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Instruction.h:20,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/BasicBlock.h:19,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/Function.h:24,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/IR/PassManager.h:44,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Transforms/PGOInstrumentation.h:17,
   from 
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:51:
  
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/include/llvm/Support/CommandLine.h:1296:3:
 note: declared private here
 opt(const opt &) = delete;
 ^~~
  
/home/davidlt/root_patch_check/a/BUILD/slc7_ppc64le_gcc700/lcg/root/6.09.04/root-6.09.04/interpreter/llvm/src/lib/Transforms/Instrumentation/PGOInstrumentation.cpp:155:25:
 error: use of deleted function 'llvm::cl::opt::opt(const llvm::cl::opt&) 
[with DataType = std::basic_string; bool ExternalStorage = false; 
ParserClass = llvm::cl::parser]'
 ProfileFileName = PGOTestProfileFile;