[PATCH] D157029: [llvm] Construct option spelling at compile-time

Ben Langmuir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 4 10:46:26 PDT 2023


benlangmuir added inline comments.


================
Comment at: llvm/include/llvm/Option/Option.h:103
 
+  StringLiteral getSpelling() const {
+    assert(Info && "Must have a valid info!");
----------------
This could use a doc comment to differentiate it from other string representations.

How does this compare with `Arg::getSpelling`? With `Arg`, IIUC the "spelling" is how it was actually written rather than a canonical form.  That might be confusing if this one is canonical; so we should at least clearly document it or maybe put "canonical" in the API name?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157029



More information about the cfe-commits mailing list