r275368 - Add C++ dependencies to xray runtime

Mikael Holmén via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 02:30:12 PDT 2016


Hi,

Your commit

     Add C++ dependencies to xray runtime

Doesn't compile with gcc. At least 5.3 and 4.8.4 complains about this 
change:

+  if (Args.hasArg(options::OPT_fxray_instrument,
+                  options::OPT_fnoxray_instrument, false)) {
+    CmdArgs.push_back("-fxray-instrument");
+    if (Arg *A = Args.getLastArg(options::OPT_fxray_instruction_threshold_,
+ 
options::OPT_fxray_instruction_threshold_EQ)) {
+      CmdArgs.push_back("-fxray-instruction-threshold");
+      CmdArgs.push_back(A->getValue());
+    }
+  }
+

../tools/clang/lib/Driver/Tools.cpp:4613:57: error: converting to 
'llvm::opt::OptSpecifier' from initializer list would use explicit 
constructor 'llvm::opt::OptSpecifier::OptSpecifier(bool)'
                    options::OPT_fnoxray_instrument, false)) {
                                                          ^
In file included from ../include/llvm/Option/OptTable.h:15:0,
                  from ../include/llvm/Option/Option.h:15,
                  from ../tools/clang/lib/Driver/Tools.h:19,
                  from ../tools/clang/lib/Driver/Tools.cpp:10:
../include/llvm/Option/OptSpecifier.h:24:14: error: 
'llvm::opt::OptSpecifier::OptSpecifier(bool)' is private
      explicit OptSpecifier(bool) = delete;
               ^
../tools/clang/lib/Driver/Tools.cpp:4613:57: error: within this context
                    options::OPT_fnoxray_instrument, false)) {
                                                          ^
../tools/clang/lib/Driver/Tools.cpp:4613:57: error: use of deleted 
function 'llvm::opt::OptSpecifier::OptSpecifier(bool)'
In file included from ../include/llvm/Option/OptTable.h:15:0,
                  from ../include/llvm/Option/Option.h:15,
                  from ../tools/clang/lib/Driver/Tools.h:19,
                  from ../tools/clang/lib/Driver/Tools.cpp:10:
../include/llvm/Option/OptSpecifier.h:24:14: error: declared here
      explicit OptSpecifier(bool) = delete;
               ^
In file included from 
../tools/clang/include/clang/Driver/SanitizerArgs.h:15:0,
                  from ../tools/clang/lib/Driver/Tools.cpp:24:
../include/llvm/Option/ArgList.h:191:8: error:   initializing argument 3 
of 'bool llvm::opt::ArgList::hasArg(llvm::opt::OptSpecifier, 
llvm::opt::OptSpecifier, llvm::opt::OptSpecifier) const'
    bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) 
const {
         ^
ninja: build stopped: subcommand failed.
system(/proj/flexasic/app/ninja/1.4/SLED11-64/bin/ninja -j1 -C 
build-all-gcc53 llc llvm-stress opt clang all) failed: child exited with 
value 1


More information about the cfe-commits mailing list