[PATCH] D64253: Let unaliased Args track which Alias they were created from, and use that in Arg::getAsString() for diagnostics

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 8 13:04:26 PDT 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/include/llvm/Option/Arg.h:59
   /// The argument values, as C strings.
   SmallVector<const char *, 2> Values;
 
----------------
I'm not sure this is really true:
> For convenience, I just store the alias directly in the unaliased arg – there aren't many arg objects at runtime, so that seems ok.
Command lines can end up being quite long. Consider:
```
$ wc -lc out/clang/browser_tests.exe.rsp
  5381 361257 out/clang/browser_tests.exe.rsp
```

However, if someone comes along and cares about this, they can try shrinking this SmallVector instead, and using something similar to TinyPtrVector.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64253/new/

https://reviews.llvm.org/D64253





More information about the cfe-commits mailing list