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

Guilherme Amadio via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 04:12:42 PST 2017


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





More information about the cfe-commits mailing list