[PATCH] D94680: [clang][cli] NFC: Parse some LangOpts after the defaults are set

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D94680 Files:

[PATCH] D94488: [clang][cli] Port more CodeGenOptions to marshalling infrastructure

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa2fe9608c1c: [clang][cli] Port more CodeGenOptions to marshalling infrastructure (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D94488?vs=316045=316619#toc Repository:

[PATCH] D94681: [clang][cli] NFC: Promote ParseLangArgs and ParseCodeGenArgs to members

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D94681 Files:

[PATCH] D84673: [clang][cli] Port DiagnosticOpts to new option parsing system

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thanks for reporting that, @rupprecht. I'll look into the issue in a couple of days. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84673/new/ https://reviews.llvm.org/D84673

[PATCH] D94675: [clang][cli] NFC: Decrease the scope of ParseCodeGenArgs parameters

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D94675 Files:

[PATCH] D94682: [clang][cli] Parse Lang and CodeGen options separately

2021-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Driver/Options.td:1831 + MarshallingInfoString, +!strconcat(open_cl.KeyPath, " ? LangOptions::LaxVectorConversionKind::None" +" :

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D94472#2508018 , @dexonsmith wrote: > I have three concerns with the approach: > > 1. Churn. This adds a lot of code that will eventually be removed / > refactored away. One example is that shifting the `NDEBUG` logic to

[PATCH] D95369: [WIP][clang][cli] Generate and round-trip analyzer options

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: steakhal, dang, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald

[PATCH] D95366: [WIP][clang][cli] Generate and round-trip preprocessor options

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implements generation of remaining

[PATCH] D95342: [clang][cli] Store LangStandard::Kind in LangOptions

2021-01-26 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2154cffdc2a6: [clang][cli] Store LangStandard::Kind in LangOptions (authored by jansvoboda11). Changed prior to commit:

[PATCH] D95340: [clang][cli] NFC: Simplify BoolOption API

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb61639985e21: [clang][cli] NFC: Simplify BoolOption API (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D95342: [clang][cli] Store LangStandard::Kind in LangOptions

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:18 #include "clang/Basic/CommentOptions.h" +#include "clang/Basic/LangStandard.h" #include "clang/Basic/LLVM.h" dexonsmith wrote: > Nit: clang-format wants you to move this

[PATCH] D95343: [clang][cli] Port GNU language options to marshalling system

2021-01-26 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG956d8e02e8a5: [clang][cli] Port GNU language options to marshalling system (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D95344: [clang][cli] Accept strings instead of options in ImpliedByAnyOf

2021-01-26 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9338f3a586bc: [clang][cli] Accept strings instead of options in ImpliedByAnyOf (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D95345: [clang][cli] Port GPU-related language options to marshalling system

2021-01-26 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7025fef3f653: [clang][cli] Port GPU-related language options to marshalling system (authored by jansvoboda11). Repository: rG LLVM Github

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318459. jansvoboda11 added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files: clang/include/clang/Frontend/CompilerInvocation.h

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318457. jansvoboda11 added a comment. Move boilerplate from CreateFromArgs to separate function Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D95147: [clang][cli] Port visibility LangOptions to marshalling system

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGff5f42e41338: [clang][cli] Port visibility LangOptions to marshalling system (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318452. jansvoboda11 added a comment. Create function for argument generation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318475. jansvoboda11 added a comment. Herald added a subscriber: dang. Add round-tripping arguments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D95221: [clang][cli] NFC: Move prefix to the front of BoolOption

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: dang, jfb. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The prefix used to be the last (optional) argument

[PATCH] D95225: [clang][cli] NFC: Pass CC1Option explicitly to BoolOption

2021-01-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: dang, jfb. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When `Bool{F,G}Option` were introduced, they were

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thanks for putting your time into the comment, @dexonsmith. I agree that adding a `-round-trip-args` flag to enable/disable round-tripping is more sensible than hard-coding it via something like `#ifndef NDEBUG`. Providing `-round-trip-args-debug-mode` to help with

[PATCH] D94957: [clang][cli] Port more options to new parsing system

2021-01-20 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe20d46628a31: [clang][cli] Port more options to new parsing system (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94957/new/

[PATCH] D95221: [clang][cli] NFC: Move prefix to the front of BoolOption

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG46ec0254a97d: [clang][cli] NFC: Move prefix to the front of BoolOption (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95221/new/

[PATCH] D95225: [clang][cli] NFC: Pass CC1Option explicitly to BoolOption

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG209f46188913: [clang][cli] NFC: Pass CC1Option explicitly to BoolOption (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D95340: [clang][cli] NFC: Simplify BoolOption API

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. Herald added subscribers: dang, jfb. jansvoboda11 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. The

[PATCH] D95342: [clang][cli] Store LangStandard::Kind in LangOptions

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318951. jansvoboda11 added a comment. Remove Digraphs from CompilerInvocation.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95342/new/ https://reviews.llvm.org/D95342 Files:

[PATCH] D95342: [clang][cli] Store LangStandard::Kind in LangOptions

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `LangStandard::Kind` parsed from command line

[PATCH] D95343: [clang][cli] Port GNU language options to marshalling system

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Port some GNU-related language options to the

[PATCH] D95347: [clang][cli] Port LangOpts to marshalling system, pt. 2

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Port some miscellaneous language options to the

[PATCH] D95345: [clang][cli] Port GPU-related language options to marshalling system

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318963. jansvoboda11 added a comment. Remove diagnostics from ParseLangArgs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95345/new/ https://reviews.llvm.org/D95345 Files:

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318970. jansvoboda11 added a comment. Preserve pointer identity when round-tripping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D95344: [clang][cli] Accept strings instead of options in ImpliedByAnyOf

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. To be able to use a constant keypaths

[PATCH] D95345: [clang][cli] Port GPU-related language options to marshalling system

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Port some GPU-related language options to the

[PATCH] D95346: [clang][cli] Port LangOpts to marshalling system, pt.1

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Port some miscellaneous language options to the

[PATCH] D95348: [clang][cli] Port OpenMP-related LangOpts to marshalling system

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: dang, guansong, yaxunl. jansvoboda11 requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project:

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 318975. jansvoboda11 added a comment. Undo changes to string allocation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D94950: [clang] Speculative fix for buffer overrun on raw string parse

2021-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This attempts to fix a (non-deterministic) buffer overrun when parsing raw string literals during modular build. Similar fix to

[PATCH] D94682: [clang][cli] Parse Lang and CodeGen options separately

2021-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG39a2a233f884: [clang][cli] Parse Lang and CodeGen options separately (authored by jansvoboda11). Changed prior to commit:

[PATCH] D94682: [clang][cli] Parse Lang and CodeGen options separately

2021-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Committed with the parsing macro moved to the top of the file as discussed with Michael. This will make following patches cleaner. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94682/new/

[PATCH] D94957: [clang][cli] Port more options to new parsing system

2021-01-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: dang, jfb. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds marshalling information to more

[PATCH] D94674: [clang][cli] NFC: Decrease the scope of ParseLangArgs parameters

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc495dfe0268b: [clang][cli] NFC: Decrease the scope of ParseLangArgs parameters (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94675: [clang][cli] NFC: Decrease the scope of ParseCodeGenArgs parameters

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a49944b59db: [clang][cli] NFC: Decrease the scope of ParseCodeGenArgs parameters (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94678: [clang][cli] Parse & generate options necessary for LangOptions defaults manually

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG791634b999e3: [clang][cli] Parse generate options necessary for LangOptions defaults… (authored by jansvoboda11). Changed prior to commit:

[PATCH] D94679: [clang][cli] NFC: Add PIE parsing for precompiled input and IR

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG383262933045: [clang][cli] NFC: Add PIE parsing for precompiled input and IR (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94680: [clang][cli] NFC: Parse some LangOpts after the defaults are set

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa7dcd3aeb0fb: [clang][cli] NFC: Parse some LangOpts after the defaults are set (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D94681: [clang][cli] NFC: Promote ParseLangArgs and ParseCodeGenArgs to members

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1744f4c67641: [clang][cli] NFC: Promote ParseLangArgs and ParseCodeGenArgs to members (authored by jansvoboda11). Repository: rG LLVM Github

[PATCH] D94802: [clang][cli] Parse HeaderSearch options separately

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D94803: [clang][cli] Generate HeaderSearch options separately

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D94803 Files:

[PATCH] D94472: [clang][cli] Manually generate header search arguments

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 317003. jansvoboda11 added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Add (improved) round-trip mechanism Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1839 +OptName = Dash + OptTable.getOptionName(OPT_stdlib_EQ); +Args.emplace_back(SA(OptName + "libc++")); + } I plan to move the prefixing of the option name and

[PATCH] D94474: [WIP][clang][cli] Test manual header search argument generation with round-trip

2021-01-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 abandoned this revision. jansvoboda11 added a comment. Hmm, that would still require us to keep a list of options we've converted. It's better than hard-coding it like this patch does, but I'd like it to be more automatic. I've updated D94472 with

[PATCH] D84673: [clang][cli] Port DiagnosticOpts to new option parsing system

2021-01-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:102-107 + std::string getMacroName() const { +if (KeyPath.startswith("DiagnosticOpts.")) + return (Twine("DIAG_") + MarshallingInfo::MacroName).str(); + +return

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2021-01-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. This will make more sense after looking at D84673 . In short: parsing of diagnostic options can happen outside of `CompilerInvocation::createFromArgs`, that's why `ParseDiagnosticArgs` is a free function. Ideally, we'd like to

[PATCH] D93702: [clang][cli] NFC: Make marshalling macros reusable

2021-01-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3040 -#define OPTION_WITH_MARSHALLING( \ -PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ -HELPTEXT,

[PATCH] D83979: [clang][cli] Port LangOpts option flags to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG383778e2171b: [clang][cli] Port LangOpts option flags to new option parsing system (authored by jansvoboda11). Changed prior to commit:

[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 312157. jansvoboda11 added a comment. Reduce number of instantiations of denormalizeString template Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84186/new/ https://reviews.llvm.org/D84186 Files:

[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:261-263 /// The inlining stack depth limit. - // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls). - unsigned InlineMaxStackDepth = 5; + unsigned

[PATCH] D84187: [clang][cli] Port DependencyOutput string based options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0da240c2d050: [clang][cli] Port DependencyOutput string based options to new option parsing… (authored by jansvoboda11). Repository: rG LLVM

[PATCH] D92531: Reapply "Frontend: Sink named pipe logic from CompilerInstance down to FileManager"

2020-12-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Left one question. Comment at: clang/lib/Basic/SourceManager.cpp:567 + if (IR.ContentsEntry->isNamedPipe()) +(void)IR.getBufferOrNone(Diag, getFileManager(), SourceLocation()); + What's the reason behind duplicating the logic

[PATCH] D84018: [clang][cli] Port Preprocessor and PreprocessorOutput option flags to new option parsing system

2020-12-14 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4b6f29413c59: [clang][cli] Port Preprocessor and PreprocessorOutput option flags to new… (authored by jansvoboda11). Changed prior to commit:

[PATCH] D84668: [clang][cli] Port TargetOpts simple string based options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:248 +template ::value, bool> = true> static void denormalizeSimpleEnum(SmallVectorImpl , dexonsmith wrote: > I don't think this needs to be templated; it can just use the

[PATCH] D84668: [clang][cli] Port TargetOpts simple string based options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 312171. jansvoboda11 added a comment. Remove template Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84668/new/ https://reviews.llvm.org/D84668 Files: clang/include/clang/Driver/Options.td

[PATCH] D84670: Port HeaderSearch simple string options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 commandeered this revision. jansvoboda11 added a reviewer: dang. jansvoboda11 added a reviewer: dexonsmith. jansvoboda11 added a comment. Taking over this patch, as Daniel is no longer involved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84670: [clang][cli] Port HeaderSearch simple string options to new option parsing system

2020-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 312176. jansvoboda11 added a comment. Rebase, undo unnecessary move of options Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84670/new/ https://reviews.llvm.org/D84670 Files:

[PATCH] D94803: [clang][cli] Generate HeaderSearch options separately

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd0e8a9e5a2f0: [clang][cli] Generate HeaderSearch options separately (authored by jansvoboda11). Changed prior to commit:

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D94472#2523053 , @Bigcheese wrote: > The only issue I have with this if always parsing twice has a noticeable > performance impact for any users of Clang. Can we measure the impact? If it's > small (< 100ms ?) then

[PATCH] D94802: [clang][cli] Parse HeaderSearch options separately

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG05127fba4b66: [clang][cli] Parse HeaderSearch options separately (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D94472: [WIP][clang][cli] Command line round-trip for HeaderSearch options

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319526. jansvoboda11 added a comment. Compare once and twice generated arguments, fix re-ordering of UserEntries Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472

[PATCH] D95532: [clang][cli] Use variadic macros for parsing/generating

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch makes all macros forwarding to `PARSE_OPTION_WITH_MARSHALLING` and

[PATCH] D95516: [clang][cli] Benchmark command line round-trip

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: mgorny. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds a micro-benchmark for command line

[PATCH] D95348: [clang][cli] Port OpenMP-related LangOpts to marshalling system

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9ad94c126aac: [clang][cli] Port OpenMP-related LangOpts to marshalling system (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some members of CompilerInvocation store `StringRef`s pointing to the command line

[PATCH] D95516: [clang][cli] Benchmark command line round-trip

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/benchmarks/CMakeLists.txt:3 + +target_link_libraries(CompilerInvocationBench + PRIVATE Not sure if we should do anything else here. I mostly cargo-culted this from clangd. Comment at:

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D95514#2526064 , @dexonsmith wrote: > Well, the compiler developers are the users, since `-cc1` isn't for > end-users. I acknowledge it's a tradeoff. IMO, without actually seeing it in > practice, it seems a bit nicer to

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I've changed this patch so that the errors and debugging output goes to `DiagnosticsEngine`. Also, I switched back to the original solution, where we always round-trip when Clang is built certain way (this time not when CMake was configured with

[PATCH] D95792: [clang][cli] Report result of ParseLangArgs

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 321136. jansvoboda11 added a comment. Rely on DiagnosticsEngine when reporting parsing result Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95792/new/ https://reviews.llvm.org/D95792 Files:

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 321137. jansvoboda11 added a comment. Herald added a subscriber: mgorny. Don't round-trip when the driver says so. Round-trip all the time when built to do so. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D95581: Frontend: Refactor compileModuleAndReadAST, NFC

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95581/new/ https://reviews.llvm.org/D95581

[PATCH] D95793: [clang][cli] Generate and round-trip language options

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 321135. jansvoboda11 added a comment. Revert reporting failure when parsing sanitizers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95793/new/ https://reviews.llvm.org/D95793 Files:

[PATCH] D95792: [clang][cli] Report result of ParseLangArgs

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3096 + + return Success; } dexonsmith wrote: > Would this avoid the changes above? > ``` > return Success && !Diags.hasErrorOccurred(); > ``` > ? > > Alternatively,

[PATCH] D95793: [clang][cli] Generate and round-trip language options

2021-02-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 321131. jansvoboda11 added a comment. Fix failures of tests that invoke -cc1 directly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95793/new/ https://reviews.llvm.org/D95793 Files:

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-02-04 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG225ccf0c50a8: [clang][cli] Command line round-trip for HeaderSearch options (authored by jansvoboda11). Changed prior to commit:

[PATCH] D96036: [clang][codegen] Remember string used to create llvm::Regex for optimization remarks

2021-02-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Regular expression patterns passed through the command line are being used to create an

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D95514#2525255 , @dexonsmith wrote: > Can you include the use in the patch? > I also wonder what command-line option is forcing this. The use-case that requires it is here:

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Frontend/CompilerInvocation.h:144 + /// Container holding strings allocated during round-trip. + mutable std::forward_list AllocatedStrings; + dexonsmith wrote: > I suggest using

[PATCH] D95532: [clang][cli] Use variadic macros for parsing/generating

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG374862d71c1a: [clang][cli] Use variadic macros for parsing/generating (authored by jansvoboda11). Changed prior to commit:

[PATCH] D95516: [WIP][clang][cli] Benchmark command line round-trip

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319917. jansvoboda11 added a comment. Remove hard-coded arguments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95516/new/ https://reviews.llvm.org/D95516 Files: clang/CMakeLists.txt

[PATCH] D95369: [WIP][clang][cli] Generate and round-trip analyzer options

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319894. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95369/new/ https://reviews.llvm.org/D95369 Files: clang/include/clang/Driver/Options.td

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319868. jansvoboda11 added a comment. Ensure Diags get used only once, add disabling flag, clean up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Driver/Options.td:593-594 +def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>, + HelpText<"Performs 'parse-generate-parse' round-trip of command line arguments.">; +def

[PATCH] D95629: [clang][analyzer] Own string keys in AnalyzerOptions::ConfigTable

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: steakhal, ASDenysPetrov, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. jansvoboda11 requested review of this

[PATCH] D95366: [WIP][clang][cli] Generate and round-trip preprocessor options

2021-01-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 319902. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95366/new/ https://reviews.llvm.org/D95366 Files: clang/include/clang/Driver/Options.td

[PATCH] D95514: [clang][cli] Teach CompilerInvocation to allocate strings on its own

2021-01-29 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 abandoned this revision. jansvoboda11 added a comment. Closing this in favor of D95629 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95514/new/ https://reviews.llvm.org/D95514

[PATCH] D95583: Frontend: Add -f{, no-}implicit-modules-uses-lock and -Rmodule-lock

2021-01-29 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Left a question in-line. Comment at: clang/test/Modules/implicit-modules-use-lock.m:21 + +// CHECK-NO-LOCKS-NOT: remark: +// CHECK-LOCKS: remark: locking '{{.*}}.pcm' to build module 'X' [-Rmodule-lock] Where is the empty remark

[PATCH] D95629: [clang][analyzer] Own string keys in AnalyzerOptions::ConfigTable

2021-01-29 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D95629#2528931 , @dexonsmith wrote: > I think this patch can be skipped. `StringMap` owns its own strings. > `StringMapEntry` uses tail allocation to include a null-terminated string > inline. For details, have a look at

[PATCH] D95532: [clang][cli] Use variadic macros for parsing/generating

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Reverted this, because we're hitting weird preprocessor behavior in MSVC 2017. `__VA_ARGS__` form a single preprocessing token that cannot be expanded into the original arguments, in our case `PREFIX_TYPE`, `NAME`, `ID`, etc. Repository: rG LLVM Github Monorepo

[PATCH] D95583: Frontend: Add -f{, no-}implicit-modules-uses-lock and -Rmodule-lock

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/Modules/implicit-modules-use-lock.m:21 + +// CHECK-NO-LOCKS-NOT: remark: +// CHECK-LOCKS: remark: locking '{{.*}}.pcm' to build

[PATCH] D94472: [clang][cli] Command line round-trip for HeaderSearch options

2021-01-30 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 320315. jansvoboda11 added a comment. Create proper diagnostics, add remark tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94472/new/ https://reviews.llvm.org/D94472 Files:

<    1   2   3   4   5   6   7   8   9   10   >