rnk added inline comments. ================ Comment at: tools/driver/driver.cpp:451 @@ +450,3 @@ + if (Tokenizer == &llvm::cl::TokenizeWindowsCommandLine) { + // The first instance of '#' should be replaced with '='. + auto AdjustOpt = [] (const char *Opt) { ---------------- I'd also rather factor this out of driver main, since it's really not important to most readers.
================ Comment at: tools/driver/driver.cpp:452 @@ +451,3 @@ + // The first instance of '#' should be replaced with '='. + auto AdjustOpt = [] (const char *Opt) { + if (char *NumberSignPtr = const_cast<char *>(::strchr(Opt, '#'))) ---------------- hans wrote: > Maybe don't take the parameter as a const char* if the constness needs to be > dropped for the adjusting to take place? The const_cast could just be moved > to where you make the call below. I think TokenizeCommandLine builds you a list of const strings, unfortunately. We could avoid the cast if we hooked into the tokenization or StringSaver, but it didn't seem worth it. http://reviews.llvm.org/D11896 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits