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

Reply via email to