This is an archive of the discontinued LLVM Phabricator instance.

Port ObjCMTAction to new option parsing system
ClosedPublic

Authored by jansvoboda11 on Jun 30 2020, 4:03 AM.

Details

Summary

Merge existing marhsalling info kinds and add some primitives to
express flag options that contribute to a bitfield.

Depends on D82574

Diff Detail

Event Timeline

dang created this revision.Jun 30 2020, 4:03 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 30 2020, 4:03 AM
dang marked an inline comment as done.Jun 30 2020, 4:05 AM
dang added inline comments.
clang/include/clang/Driver/Options.td
345–347

If this kind of combination of normalizer, value merger and extractor happen again, I will make a mixin that helps set this up. Or do you reckon it is worth doing it now for readability.

dang updated this revision to Diff 274425.Jun 30 2020, 4:54 AM

Denormalizer should also use the extractor

dang marked an inline comment as not done.Jun 30 2020, 10:13 AM
dang updated this revision to Diff 274736.Jul 1 2020, 3:16 AM

Remove the need for the merger and extractor to be macros

dang updated this revision to Diff 275171.Jul 2 2020, 11:09 AM

Ensure that mergeForwardValue can accept default values whose type doesn't quite match the associated keypath.

dang updated this revision to Diff 276008.Jul 7 2020, 5:12 AM

Make mergers use values directly instead of constant references.

This revision is now accepted and ready to land.Aug 19 2020, 5:45 PM
jansvoboda11 commandeered this revision.Nov 9 2020, 4:18 AM
jansvoboda11 added a reviewer: dang.
jansvoboda11 added a subscriber: jansvoboda11.

Taking control of this revision, as Daniel is no longer involved.

Rebase on top of D82756.

jansvoboda11 requested review of this revision.Nov 9 2020, 4:51 AM
This revision is now accepted and ready to land.Nov 10 2020, 8:58 AM

This seems to breaking clang-5 builds:

utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o: In function `llvm::EmitOptParser(llvm::RecordKeeper&, llvm::raw_ostream&)':
/var/lib/buildkite-agent/builds/buildkite-69fdf6c495-wt2bd-1/mlir/mlir-core/llvm/utils/TableGen/OptParserEmitter.cpp:(.text._ZN4llvm13EmitOptParserERNS_12RecordKeeperERNS_11raw_ostreamE+0x148a): undefined reference to `MarshallingInfo::MacroName'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(https://buildkite.com/mlir/mlir-core/builds/9273#ae602c1f-8c21-4ac6-90bb-99c9a3ae473e)

This seems to breaking clang-5 builds:

utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o: In function `llvm::EmitOptParser(llvm::RecordKeeper&, llvm::raw_ostream&)':
/var/lib/buildkite-agent/builds/buildkite-69fdf6c495-wt2bd-1/mlir/mlir-core/llvm/utils/TableGen/OptParserEmitter.cpp:(.text._ZN4llvm13EmitOptParserERNS_12RecordKeeperERNS_11raw_ostreamE+0x148a): undefined reference to `MarshallingInfo::MacroName'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(https://buildkite.com/mlir/mlir-core/builds/9273#ae602c1f-8c21-4ac6-90bb-99c9a3ae473e)

Jan is in Europe and may not see this until tomorrow; if you need this fixed sooner you might want to revert.

Reverted in f917356f9ce0 ; I suspect a static constexpr in a class missing a definition out of class (required pre-c++17).

Thank you for the heads-up. It seems like Clang 5 didn't like the usage of static constexpr member via an instance.