[PATCH] D133622: [clang][test] Disallow using the default module cache path in lit tests

2022-09-12 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd96f526196ac: [clang][test] Disallow using the default module cache path in lit tests (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D133622: [clang][test] Disallow using the default module cache path in lit tests

2022-09-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Reverted due to failure on a bot https://lab.llvm.org/buildbot/#/builders/214/builds/3252 I'm not sure how to deal with missing `env -u`. - We could do `env CLANG_MODULE_CACHE_PATH=` and change the compiler's interpretation of empty string for this variable. I'm no

[PATCH] D133622: [clang][test] Disallow using the default module cache path in lit tests

2022-09-14 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In D133622#3788218 , @bruno wrote: >> I'm not sure how to deal with missing `env -u`. >> >> - We could do `env CLANG_MODULE_CACHE_PATH=` and change the compiler's >> interpretation of empty string for this variable. I'm not s

[PATCH] D128571: [X86] Support `_Float16` on SSE2 and up

2022-06-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. This broke some compiler-rt tests on Darwin: https://green.lab.llvm.org/green/job/clang-stage1-RA/29920/ Test Result (3 failures / +3) Builtins-x86_64-darwin.Builtins-x86_64-darwin.extendhfsf2_test.c Builtins-x86_64-darwin.Builtins-x86_64-darwin.truncdfhf2_test.

[PATCH] D128571: [X86] Support `_Float16` on SSE2 and up

2022-06-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Reverted in eab2a06f0fde due to the Darwin test failures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128571/new/ https://reviews.llvm.org/D12857

[PATCH] D128772: [Lex] Make sure to notify `MultipleIncludeOpt` for "read tokens" during fast dependency directive lexing

2022-06-29 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:4251 DepDirectives.front().Tokens[NextDepDirectiveTokenIndex++]; + if (NextDepDirectiveTokenIndex > 1 || DDTok.Kind != tok::hash) { +// Read something other than a preprocessor directive hash.

[PATCH] D128947: [Lex] Introduce `PPCallbacks::LexedFileChanged()` preprocessor callback

2022-06-30 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:1016 +return *Name; return StringRef(); } Just a suggestion: `value_or` can be a nice way to express simple cases like this: ``` getFilename(getFileID(SpellingLoc)).value_o

[PATCH] D129220: [clang] Cleanup ASTContext before output files in crash recovery for modules

2022-07-06 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: steven_wu, akyrtzi. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When we recover from a crash in a module compilation thread, we nee

[PATCH] D129220: [clang] Cleanup ASTContext before output files in crash recovery for modules

2022-07-06 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 442706. benlangmuir added a comment. Updated per out-of-band feedback from @steven_wu : - Added an assert to `clearOutputFiles` that the `ASTConsumer` is removed. Normally this would be done in `FrontendAction::EndSourceFile`. This should help avoid re

[PATCH] D129220: [clang] Cleanup ASTContext before output files in crash recovery for modules

2022-07-07 Thread Ben Langmuir 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 rG67a84ec8105e: [clang] Cleanup ASTContext before output files in crash recovery for modules (authored by benlangmuir). Repository: rG LLVM Github M

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, Bigcheese. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When building modules, override secondary outputs (dependency

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 443379. benlangmuir added a comment. Updates: - Made lookup of module outputs fallible. Not currently used by clang-scan-deps, but since the expectation is for a build system to provide these settings account for possibility of errors. - Attempt to fix

[PATCH] D123104: [Modules] Use looked-up filename when looking for module maps

2022-04-05 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added inline comments. Comment at: clang/include/clang/Lex/HeaderSearch.h:758 + bool IsSystemHeaderDir, + StringRef FileName = ""); This parameter co

[PATCH] D129884: [clang][deps] Include canonical invocation in ContextHash

2022-07-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In D129884#3677435 , @jansvoboda11 wrote: > Would it make sense for this to replace the existing strict context hash > implementation? It's not clear to me whether this would be a good tradeoff or not: the explicit build c

[PATCH] D129884: [clang][deps] Include canonical invocation in ContextHash

2022-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 448370. benlangmuir added a comment. - Added comments to tests - Added a missing test that I accidentally deleted - Rebased on latest main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129884/new/ https://r

[PATCH] D130710: [ASTWriter] Provide capability to output a PCM/PCH file that does not write out information about its output path

2022-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. Is the functionality provided by `ORIGINAL_PCH_DIR` still useful for making it possible to move a PCH and its referenced headers? It's not completely clear to me when this feature is used in practice. It would be nice to remove it or change the default behaviour i

[PATCH] D129884: [clang][deps] Include canonical invocation in ContextHash

2022-07-28 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG028717014002: [clang][deps] Include canonical invocation in ContextHash (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129884/new/

[PATCH] D130934: [clang] Update code that assumes FileEntry::getName is absolute NFC

2022-08-01 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: bnbarham, jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. It's an accident that we started return asbol

[PATCH] D130935: [clang] Only modify FileEntryRef names that are externally remapped

2022-08-01 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: bnbarham, jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As progress towards having FileEntryRef contain the requested n

[PATCH] D130935: [clang] Only modify FileEntryRef names that are externally remapped

2022-08-01 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:277-278 - if (Status.getName() == Filename) { -// The name matches. Set the FileEntry. + if (Status.getName() == Filename || !Status.ExposesExternalVFSPath) { +// Use the requested name. Se

[PATCH] D130935: [clang] Only modify FileEntryRef names that are externally remapped

2022-08-01 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 449124. benlangmuir added a comment. Flip the order of comparisons to avoid unnecessary string comparisons. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130935/new/ https://reviews.llvm.org/D130935 Files:

[PATCH] D130934: [clang] Update code that assumes FileEntry::getName is absolute NFC

2022-08-01 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4c6dc2e6637: [clang] Update code that assumes FileEntry::getName is absolute NFC (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13

[PATCH] D130935: [clang] Only modify FileEntryRef names that are externally remapped

2022-08-01 Thread Ben Langmuir 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 rG98cf745a032e: [clang] Only modify FileEntryRef names that are externally remapped (authored by benlangmuir). Repository: rG LLVM Github Monorepo

[PATCH] D131004: [clang] Add FileEntryRef::getNameAsRequested()

2022-08-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: bnbarham. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As progress towards having FileManager::getFileRef() return the path as-req

[PATCH] D131017: Fix use-after-free in clang-apply-replacements

2022-08-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: bnbarham, fmayer. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Accidentally introduced a dangling StringRef in b4c6dc2e6

[PATCH] D130934: [clang] Update code that assumes FileEntry::getName is absolute NFC

2022-08-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. @fmayer thanks, fix is: https://reviews.llvm.org/D131017 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130934/new/ https://reviews.llvm.org/D130934 ___ cfe-commits mailing li

[PATCH] D131017: Fix use-after-free in clang-apply-replacements

2022-08-02 Thread Ben Langmuir 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 rG54110b8aa010: Fix use-after-free in clang-apply-replacements (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-03 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: bnbarham. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sharing the FileManager between the importer and the module build should onl

[PATCH] D131004: [clang] Add FileEntryRef::getNameAsRequested()

2022-08-03 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6a79e2ff1989: [clang] Add FileEntryRef::getNameAsRequested() (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131004/new/ https://re

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-03 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 449781. benlangmuir added a comment. - Updates for review feedback - Attempt to fix one of the Windows path issues - I'm just guessing based on what other VFS tests are doing. I don't know what the other windows failure is about, and probably need to de

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-05 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 450313. benlangmuir added a comment. Herald added a subscriber: ormris. Attempt to fix test failure seen on Windows. It revealed two bugs - Avoid reusing the FileManager at the top-level in clang-scan-deps to make the test behave as expected - Make the F

[PATCH] D131273: [clang] Fix redirection behaviour for cached FileEntryRef

2022-08-05 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: bnbarham. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In 6a79e2ff1989b

[PATCH] D131273: [clang] Fix redirection behaviour for cached FileEntryRef

2022-08-05 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd038bb196c51: [clang] Fix redirection behaviour for cached FileEntryRef (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131273/new/

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-05 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 450356. benlangmuir added a comment. Split out the FileManager change into https://reviews.llvm.org/D131273 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131076/new/ https://reviews.llvm.org/D131076 Files: clang/include/clang/Driver/Options.t

[PATCH] D131076: [clang][modules] Don't depend on sharing FileManager during module build

2022-08-05 Thread Ben Langmuir 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 rGfb89cc0ddbd9: [clang][modules] Don't depend on sharing FileManager during module build (authored by benlangmuir). Repository: rG LLVM Github Monor

[PATCH] D131412: [clang][deps] Stop sharing FileManager across module builds in scanner

2022-08-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, Bigcheese. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Sharing the FileManager across implicit module builds currentl

[PATCH] D131420: [clang][deps] Always generate module paths

2022-08-08 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM, thanks for cleaning it up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131420/new/ https://reviews.llvm.org/D131420 _

[PATCH] D131412: [clang][deps] Stop sharing FileManager across module builds in scanner

2022-08-08 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33af4b22f8ea: [clang][deps] Stop sharing FileManager across module builds in scanner (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D123197: Remove a few effectively-unused FileEntry APIs. NFC

2022-04-06 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/unittests/Basic/FileEntryTest.cpp:47-52 FileEntryRef addFile(StringRef Name) { -FEs.push_back(std::make_unique()); +const FileEntry *FE = +FM.getVirtualFile(std::to_string(UniqueNameCounter++), 0, 0); re

[PATCH] D123197: Remove a few effectively-unused FileEntry APIs. NFC

2022-04-06 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/unittests/Basic/FileEntryTest.cpp:47-52 FileEntryRef addFile(StringRef Name) { -FEs.push_back(std::make_unique()); +const FileEntry *FE = +FM.getVirtualFile(std::to_string(UniqueNameCounter++), 0, 0); re

[PATCH] D124288: [Index] Remove reference to `UnresolvedUsingIfExists`

2022-04-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Minor suggestion for the test case, but otherwise LGTM. Comment at: clang/test/Index/using_if_exists.cpp:9 +// CHECK: [[@LINE-1]]:11 | using/C++ | foo | c:@UD@foo |

[PATCH] D124635: Frontend: Delete output streams before closing CompilerInstance outputs

2022-04-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. LGTM, although I made a suggestion about the spelling. > This fixes theoretical bugs related to proxy streams, which may have > cleanups to run in their destructor. E.g., buffer_ostream supports > pwrite() by holding all content in a buffer until destruction time. Th

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-11 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked an inline comment as done. benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:55 + getCommandLine(llvm::function_ref< + Expected(const ModuleID &)> + Looku

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-11 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 443755. benlangmuir added a comment. Updates per review - Switched to a per-output callback - Removed preserved-args.c test - Removed error handling that I no longer have a real use for - Only request .d and .diag paths if they were enabled in the origina

[PATCH] D129504: [libclang][ObjC] Inherit availability attribute from containing decls or interface decls

2022-07-11 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/tools/libclang/CIndex.cpp:8271 +else if (auto *IMD = dyn_cast(D)) + CD = IMD->getCategoryDecl(); +else if (auto *ID = dyn_cast(DC)) So this goes Impl -> Class, and CategoryImpl -> Category. Should

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-12 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6626f6fec3d3: [clang][deps] Override dependency and serialized diag files for modules (authored by benlangmuir). Changed prior to commit: https://reviews.llvm.org/D129389?vs=443755&id=443955#toc Reposi

[PATCH] D129389: [clang][deps] Override dependency and serialized diag files for modules

2022-07-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:341-342 + !MDC.OriginalInvocation.getDependencyOutputOpts().OutputFile.empty(); + // FIXME: HadSerializedDiagnostics and HadDependencyFile should be included in + //

[PATCH] D129607: [clang][deps] Fix handling of -MT in module command-line

2022-07-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a subscriber: mgorny. Herald added a project: All. benlangmuir requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Follow-up to 6626f6fec3d3

[PATCH] D129607: [clang][deps] Fix handling of -MT in module command-line

2022-07-13 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ce78cbd2392: [clang][deps] Fix handling of -MT in module command-line (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129607/new/

[PATCH] D129884: [clang][deps] Include canonical invocation in ContextHash

2022-07-15 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, Bigcheese, akyrtzi. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The "strict context hash" is insufficient to identify

[PATCH] D129504: [libclang][ObjC] Inherit availability attribute from containing decls or interface decls

2022-07-15 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129504/new/ https://reviews.llvm.org/D129504 _

[PATCH] D121733: Clean pathnames in FileManager.

2022-05-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:218 + llvm::sys::path::remove_dots(CleanFilename, /*remove_dot_dot=*/false); + Filename = CleanFilename; + ppluzhnikov wrote: > kadircet wrote: > > this is actually breaking the [con

[PATCH] D92480: [llvm] Unify interface of (ThreadSafe)?RefCountedBase

2020-12-02 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir removed a reviewer: benlangmuir. benlangmuir added a comment. Removing myself as reviewer since I no longer work in this area. Someone who is more involved with llvm Support/ADT should review this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D104348: [index] Fix performance regression with indexing macros

2021-06-15 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: arphaman. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When using FileIndexRecord with macros, symbol references can be seen out of source order, which was cau

[PATCH] D104348: [index] Fix performance regression with indexing macros

2021-06-16 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir closed this revision. benlangmuir added a comment. Pushed rG773ad55a393f Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104348/new/ https://reviews.llvm.org/D104348

[PATCH] D135220: [clang] Update ModuleMap::getModuleMapFile* to use FileEntryRef

2022-10-18 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. (catching up after I was away last week) I agree with @dexonsmith's analysis above. One historical note: > As a heuristic on top of (4), "last-ref" (before this patch) probably gets > the answer the user expects more often than "first-ref" (this patch) does, > whic

[PATCH] D135634: [clang][modules] Serialize VFS overlay paths into PCMs

2022-10-18 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a subscriber: bnbarham. benlangmuir added a comment. I think we should deduplicate the vfs overlays if the same ivfsoverlay is specified in both the pcm and the command-line. @bnbarham any concern about overlay vs chaining behaviour here? I remember you looking at that a while

[PATCH] D136717: [clang] Move getenv call for SOURCE_DATE_EPOCH out of frontend NFC

2022-10-26 Thread Ben Langmuir 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 rG211f5af38af1: [clang] Move getenv call for SOURCE_DATE_EPOCH out of frontend NFC (authored by benlangmuir). Herald added a project: clang. Herald add

[PATCH] D136717: [clang] Move getenv call for SOURCE_DATE_EPOCH out of frontend NFC

2022-10-26 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4324 +if (Epoch.getAsInteger(10, V) || V > MaxTimestamp) { Diags.Report(diag::err_fe_invalid_source_date_epoch) << Epoch << MaxTimestamp; benlangmuir wr

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: steven_wu. Herald added a subscriber: hiraditya. Herald added a project: All. benlangmuir requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang, LLVM. Avoid call

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:62 -static cl::opt +static cl::opt AsSecureLogFileName("as-secure-log-file-name", Interestingly, `opt` doesn't have a parser; this code only worked with the default value before. Repos

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:62 -static cl::opt +static cl::opt AsSecureLogFileName("as-secure-log-file-name", steven_wu wrote: > benlangmuir wrote: > > Interestingly, `opt` doesn't have a parser; this code only work

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-27 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 471351. benlangmuir added a comment. Herald added a subscriber: ormris. - Updated to use cc1 option in clang - Moved the llvm-mc option to a central location so it can be used when initialized MCTargetOptions - Added tests to cover cc1 and cc1as since eac

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 471592. benlangmuir added a comment. - --target=, remove -o per review - Use "log_file" as path to try to avoid Windows path issue in driver test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136888/new/ https://reviews.llvm.org/D136888 Files:

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:77 AutoReset(DoAutoReset), TargetOptions(TargetOpts) { - SecureLogFile = AsSecureLogFileName; + SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : ""; MaskRay wrote:

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-28 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: llvm/lib/MC/MCContext.cpp:77 AutoReset(DoAutoReset), TargetOptions(TargetOpts) { - SecureLogFile = AsSecureLogFileName; + SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : ""; benlangmuir wr

[PATCH] D136888: Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-28 Thread Ben Langmuir 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 rGe1f998302276: Move getenv for AS_SECURE_LOG_FILE to clang (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D135220: [clang] Update ModuleMap::getModuleMapFile* to use FileEntryRef

2022-11-01 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In D135220#3899674 , @dexonsmith wrote: > In D135220#3898849 , @hans wrote: > >> Relatedly, we ran into a problem with `clang-cl /showIncludes` not including >> all files in its outp

[PATCH] D131796: [clang][deps] Use a cc1 invocation in FullDependencies::getCommandLine()

2022-08-12 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, Bigcheese. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of trying to "fix" the original driver invocatin by ap

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-15 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of delaying the generation of command-lines to after all depende

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 453085. benlangmuir edited the summary of this revision. benlangmuir added a comment. Per review - Add typedef for callback type - Add comment about mapping paths to "-" - Update commit message for module cache path computation change CHANGES SINCE LAST

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked 2 inline comments as done. benlangmuir added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:403 + +static std::string getModuleCachePath(ArrayRef Args) { + for (StringRef Arg : llvm::reverse(Args)) { jansvoboda11 wr

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5482432bf6cc: [clang][deps] Compute command-lines for dependencies immediately (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D13193

[PATCH] D132066: [clang][deps] Allow switching between lazily/eagerly loaded PCMs

2022-08-17 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningService.h:50 +bool OptimizeArgs = false, +bool EagerLoadModules = false); Since you're chang

[PATCH] D132066: [clang][deps] Allow switching between lazily/eagerly loaded PCMs

2022-08-19 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Thanks, LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132066/new/ https://reviews.llvm.org/D132066 _

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added reviewers: jansvoboda11, Bigcheese. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of trying to "fix" the original driver invocation by a

[PATCH] D131796: [clang][deps] Use a cc1 invocation in FullDependencies::getCommandLine()

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir abandoned this revision. benlangmuir added a comment. Closing in favour of https://reviews.llvm.org/D132405 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131796/new/ https://reviews.llvm.org/D131796

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Herald added a subscriber: ormris. Comment at: clang/test/ClangScanDeps/diagnostics.c:31 // CHECK-NEXT: { -// CHECK-NEXT: "clang-context-hash": "[[HASH_TU:.*]], +// CHECK:"clang-context-hash": "[[HASH_TU:.*]], // CHECK-NE

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:34 +/// \see FullDependencies::Commands. +class Command { +public: jansvoboda11 wrote: > Have you considered using the `Job`/`Command` classes

[PATCH] D132419: [clang] Pull some utility functions into CompilerInvocation NFC

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Move copying compiler arguments to a vector and modifying common module-

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-22 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:102 +std::vector +serializeCompilerInvocation(const CompilerInvocation &CI); + jansvoboda11 wrote: > Maybe we could add this API directly to

[PATCH] D132419: [clang] Pull some utility functions into CompilerInvocation NFC

2022-08-23 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3708a148421f: [clang] Pull some utility functions into CompilerInvocation NFC (authored by benlangmuir). Changed prior to commit: https://reviews.llvm.org/D132419?vs=454639&id=454847#toc Repository:

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:311 +if (!MDC.isPrebuiltModule(M)) + DirectModularDeps.insert(M); + If using eager loading, this will cause us to load the module, right? Does that

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-23 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/test/ClangScanDeps/modules-incomplete-umbrella.c:82 +// CHECK_TU-NEXT: "command-line": [ +// CHECK_TU:], +// CHECK_TU-NEXT: "file-deps": [ jansvoboda11 wrote: > benlangmuir wrote: > > Th

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/lib/Frontend/CompilerInstance.cpp:2017 // migrate off of Foo.Private syntax. -if (!Sub && PP->getLangOpts().ImplicitModules && Name == "Private" && -Module == Module->getTopLevelModule()) { +if (!Sub && Nam

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455315. benlangmuir added a comment. - Remove CompilerInvocation from Command and ModuleDeps. Only the arg strings are exposed now. - Simplify Command, which is now just a simple struct. - Move the logic for mutating the CompilerInvocation for the TU into

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir marked 11 inline comments as done. benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:44 + + enum CommandKind { +CK_CC1, tschuett wrote: > Why is this not an enum class? Removed

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Frontend/CompilerInstance.cpp:2017 // migrate off of Foo.Private syntax. -if (!Sub && PP->getLangOpts().ImplicitModules && Name

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455338. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132405/new/ https://reviews.llvm.org/D132405 Files: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h clang/include/clang/Tooling/DependencyScanning/DependencyScannin

[PATCH] D132615: [clang][tooling] Allow -cc1 arguments in ToolInvocation

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ToolInvocation is useful even if you already have a -cc1 invocation, sin

[PATCH] D132616: [clang][deps] Remove CompilerInvocation from ModuleDeps

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The invocation is only ever used to serialize cc1 arguments from, so ins

[PATCH] D132617: [clang][deps] Minor ModuleDepCollector refactorings NFC

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: jansvoboda11. Herald added a project: All. benlangmuir requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Factor module map and module file path functions out - Use a secondary

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. In D132405#3747232 , @jansvoboda11 wrote: > I'd like to see this split into multiple patches. I can see some formatting > changes, removal of `CompilerInvocation` from `ModuleDeps`, isolated changes > to `Tooling`, etc. Tha

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:224 + /// a preprocessor. Storage owned by \c ModularDeps. + llvm::StringMap ModuleDepsByID; + /// Directly imported prebuilt deps. jansvoboda11

[PATCH] D132615: [clang][tooling] Allow -cc1 arguments in ToolInvocation

2022-08-24 Thread Ben Langmuir 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 rGbdc20d61b8e4: [clang][tooling] Allow -cc1 arguments in ToolInvocation (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D132616: [clang][deps] Remove CompilerInvocation from ModuleDeps

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe8febb23a07b: [clang][deps] Remove CompilerInvocation from ModuleDeps (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132616/new/ h

[PATCH] D132617: [clang][deps] Minor ModuleDepCollector refactorings NFC

2022-08-24 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455468. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132617/new/ https://reviews.llvm.org/D132617 Files: clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp Index:

[PATCH] D132617: [clang][deps] Minor ModuleDepCollector refactorings NFC

2022-08-25 Thread Ben Langmuir 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 rGc0a55121618b: [clang][deps] Minor ModuleDepCollector refactorings NFC (authored by benlangmuir). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir updated this revision to Diff 455666. benlangmuir added a comment. - Rebased, picking up the changes that were previously split out. - Broke up applying changes to CI from passing to consumer. The MDC is no longer responsible for passing invocations to the consumer, and it is done at

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:204 + /// invocation, for example when there are multiple chained invocations. + void handleInvocation(CompilerInvocation CI); + jansvoboda11 wro

<    1   2   3   4   5   6   7   8   9   >