[PATCH] D79796: Sketch support for generating CC1 command line from CompilerInvocation
Daniel Grumberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 21 22:45:27 PDT 2020
dang marked 3 inline comments as done.
dang added inline comments.
================
Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:430-440
+ std::vector<std::unique_ptr<MarshallingKindInfo>> OptsWithMarshalling;
+ for (unsigned I = 0, E = Opts.size(); I != E; ++I) {
+ const Record &R = *Opts[I];
+ // Start a single option entry.
+ OS << "OPTION(";
+ WriteOptRecordFields(OS, R);
----------------
Bigcheese wrote:
> Just to verify, this doesn't change the output for options that don't have marshalling info, right? Just want to make sure this doesn't change anything for other users of libOption.
Yes of course all the previous behavior is in the `WriteOptRecordFields` lambda capture. This adds an entirely new macro table and leaves the existing one untouched.
================
Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:468-469
+ OS << "};\n";
+ OS << "static const unsigned SimpleEnumValueTablesSize = "
+ "sizeof(SimpleEnumValueTables) / sizeof(SimpleEnumValueTable);\n";
+
----------------
Bigcheese wrote:
> What happens if there are none?
There is never going to be none as there currently already is an enum-based option that uses this setup, but it would still be nice to have a guard for that. Getting on it...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79796/new/
https://reviews.llvm.org/D79796
More information about the llvm-commits
mailing list