[PATCH] Fix PR17239 by changing the semantics of the RemainingArgsClass Option kind

Rafael Auler rafaelauler at gmail.com
Tue Aug 19 12:16:07 PDT 2014


I implemented the suggestions of Rafael & Reid, using nullptrs.

Populating a string vector with nullptrs may be dangerous if the existing users of ExpandResponseFiles assumes that all strings are valid pointers. To avoid headaches, I added a flag "MarkEOLs" in ExpandResponseFiles that is false by default. ExpandResponseFiles will only populate the Argv vector with nullptrs if this flag is true. I also updated the Option library to cope with nullptrs while parsing the Argv vector.

I will also upload the clang side in D4900. Let me know if you have more suggestions!

Cheers,
Rafael Auler

http://reviews.llvm.org/D4899

Files:
  include/llvm/Support/CommandLine.h
  lib/Option/OptTable.cpp
  lib/Option/Option.cpp
  lib/Support/CommandLine.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4899.12675.patch
Type: text/x-patch
Size: 9909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140819/465c3bdf/attachment.bin>


More information about the llvm-commits mailing list