[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked 4 inline comments as done. aaron.ballman added a comment. Committed in r333653. Comment at: test/Frontend/compiler-options-dump.cpp:3 +// RUN: %clang_cc1 -compiler-options-dump -std=c++17 %s -o - | FileCheck %s --check-p

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. +@dlj, who had some more ambitious plans for expressing our configuration as JSON. The part you have here seems fine. I share Eli's concerns about exposing our `LangOptions` with any kind of implied stability guarantee. https://reviews.llvm.org/D45835 __

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: test/Frontend/compiler-options-dump.cpp:3 +// RUN: %clang_cc1 -compiler-options-dump -std=c++17 %s -o - | FileCheck %s --check-prefix=CXX17 +// RUN: %clang_cc1 -compiler-options-dump

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-27 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: test/Frontend/compiler-options-dump.cpp:3 +// RUN: %clang_cc1 -compiler-options-dump -std=c++17 %s -o - | FileCheck %s --check-prefix=CXX17 +// RUN: %clang_cc1 -compiler-options-dump -std=c99 -ffast-math -x c %s -o - | FileCheck %s --c

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D45835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D45835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Frontend/FrontendActions.cpp:779 + { +std::string Str; +#define FEATURE(Name, Predicate) \ aaron.ballman wrote: > lebedev.ri wrote: > > This is likely to do an a

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Frontend/FrontendActions.cpp:779 + { +std::string Str; +#define FEATURE(Name, Predicate) \ lebedev.ri wrote: > This is likely to do an allocation for each fea

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 146529. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. https://reviews.llvm.org/D45835 Files: include/clang/Basic/Features.def include/clang/Driver/CC1Options.td include/clang/Fro

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Frontend/FrontendActions.cpp:779 + { +std::string Str; +#define FEATURE(Name, Predicate) \ This is likely to do an allocation for each feature. Maybe consider `l

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Ping. https://reviews.llvm.org/D45835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 145077. aaron.ballman added a comment. Updated to remove the contentious parts, though I still hope to add those back in. https://reviews.llvm.org/D45835 Files: include/clang/Basic/Features.def include/clang/Driver/CC1Options.td include/clang/F

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-04-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D45835#1073883, @efriedma wrote: > > If any of those options we care about wind up being changed, there's a good > > chance we may need to change something on our end anyway, so breaking us is > > actually useful. > > I'm not sure I fol

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-04-20 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > If any of those options we care about wind up being changed, there's a good > chance we may need to change something on our end anyway, so breaking us is > actually useful. I'm not sure I follow. The language options have specific consequences you could check some

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D45835#1072557, @efriedma wrote: > The list of features/extensions seems okay; it's information which is already > available through a stable interface (specifically, clang -E). JSON also > seems fine as a representation. > > Including

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-04-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The list of features/extensions seems okay; it's information which is already available through a stable interface (specifically, clang -E). JSON also seems fine as a representation. Including the language/codegen/etc. options as-is doesn't make sense; we can, and of

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-04-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added a reviewer: rsmith. Herald added a subscriber: cryptoad. There are situations where an out-of-tree user may need to know information about what compiler options are used and what features/extensions may be available for a given invocation