[PATCH] D41581: [COFF] Do not parse args twice if no rsp files exists

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 26 20:50:08 PST 2017


ruiu added a comment.

I still think you should split the function into two. The boolean flag doesn't look beautiful.



================
Comment at: lld/COFF/DriverUtils.cpp:737-743
   // Print the real command line if response files are expanded.
   if (Args.hasArg(OPT_verbose) && Argv.size() != Vec.size()) {
     std::string Msg = "Command line:";
     for (const char *S : Vec)
       Msg += " " + std::string(S);
     message(Msg);
   }
----------------
You don't need this for the directive section because the condition will never be true.



================
Comment at: lld/COFF/DriverUtils.cpp:746
   // Handle /WX early since it converts missing argument warnings to errors.
   errorHandler().FatalWarnings = Args.hasFlag(OPT_WX, OPT_WX_no, false);
 
----------------
This is not appropriate for the directive section too.


https://reviews.llvm.org/D41581





More information about the llvm-commits mailing list