[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-22 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. (The follow-up is at D71802 . Thanks!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71080/new/ https://reviews.llvm.org/D71080 ___ cfe-commits

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D71080#1794066 , @thakis wrote: > Why move this to Basic instead of to Driver if you want to use it in Driver? > (Frontend depends on Driver so it could then still use it.) You are right. Driver is a better place. I will creat

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Why move this to Basic instead of to Driver if you want to use it in Driver? (Frontend depends on Driver so it could then still use it.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71080/new/ https://reviews.llvm.org/D710

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-21 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7376d9eb3891: [NFC] Separate getLastArgIntValue to Basic (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71080/new/ https://reviews.llvm.org/D71080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 232639. yaxunl marked 2 inline comments as done. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71080/new/ https://reviews.llvm.org/D71080 Files: clang/include/clang/Basic/OptionUtils.h clang/in

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 5 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Basic/OptionUtils.h:24 + +class ArgList; + tra wrote: > What are the rules on using LLVM headers here? Can we just include > llvm/Option/ArgList.h instead? In

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/OptionUtils.h:24 + +class ArgList; + What are the rules on using LLVM headers here? Can we just include llvm/Option/ArgList.h instead? Comment at: clang/include/clang/Basic/Optio

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Basic/OptionUtils.cpp:18 +template +static IntTy getLastArgIntValueImpl(const ArgList &Args, OptSpecifier Id, +IntTy Default, DiagnosticsEngine *Diags) { tra wrote: > I'd use

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 232592. yaxunl marked 4 inline comments as done. yaxunl added a comment. revised by Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71080/new/ https://reviews.llvm.org/D71080 Files: clang/include/clang/Basic/OptionUtils.h clang/i

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Basic/OptionUtils.cpp:18 +template +static IntTy getLastArgIntValueImpl(const ArgList &Args, OptSpecifier Id, +IntTy Default, DiagnosticsEngine *Diags) { I'd use anonymous names

[PATCH] D71080: [NFC] Separate getLastArgIntValue to Basic

2019-12-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall, rsmith. Herald added a subscriber: mgorny. getLastArgIntValue is a useful utility function to get command line argument as an integer. Currently it is in Frontend so that it can only be used by clang -cc1. Move it to basic so t