r333202 - [bash-completion] Fix tab separation on macOS

2018-05-24 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu May 24 09:25:40 2018 New Revision: 333202 URL: http://llvm.org/viewvc/llvm-project?rev=333202&view=rev Log: [bash-completion] Fix tab separation on macOS We have a regex that needs to match a tab character in the command output, but on macOS sed doesn't support '\t',

Re: r313011 - [X86] Lower _mm[256|512]_[mask[z]]_avg_epu[8|16] intrinsics to native llvm IR

2017-09-14 Thread Ben Langmuir via cfe-commits
Sorry, I have no particular insight. My commit was reapplied verbatim shortly after that and the tests passed, so I’m not sure if there’s any relation. > On Sep 13, 2017, at 4:16 AM, Tsafrir, Yael wrote: > > Hello Galina, > > I tried to re-create the issue but with no success. I ran the test

[clang] f80a0ea - [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-30 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-30T15:23:19-07:00 New Revision: f80a0ea760728e70f70debf744277bc3aa59bc17 URL: https://github.com/llvm/llvm-project/commit/f80a0ea760728e70f70debf744277bc3aa59bc17 DIFF: https://github.com/llvm/llvm-project/commit/f80a0ea760728e70f70debf744277bc3aa59bc17.diff

[clang] 1877d76 - Revert "[clang][deps] Split translation units into individual -cc1 or other commands"

2022-08-30 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-30T15:50:09-07:00 New Revision: 1877d76aa011e6e481630523be5ed2d86d2b10f0 URL: https://github.com/llvm/llvm-project/commit/1877d76aa011e6e481630523be5ed2d86d2b10f0 DIFF: https://github.com/llvm/llvm-project/commit/1877d76aa011e6e481630523be5ed2d86d2b10f0.diff

[clang] 83902c4 - Reapply "[clang][deps] Split translation units into individual -cc1 or other commands"

2022-08-31 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-31T09:45:11-07:00 New Revision: 83902c403611af3a52453867cb8848fb3fd6a39c URL: https://github.com/llvm/llvm-project/commit/83902c403611af3a52453867cb8848fb3fd6a39c DIFF: https://github.com/llvm/llvm-project/commit/83902c403611af3a52453867cb8848fb3fd6a39c.diff

[clang] d96f526 - [clang][test] Disallow using the default module cache path in lit tests

2022-09-12 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-09-12T09:54:56-07:00 New Revision: d96f526196ac4cebfdd318473816f6d4b9d76707 URL: https://github.com/llvm/llvm-project/commit/d96f526196ac4cebfdd318473816f6d4b9d76707 DIFF: https://github.com/llvm/llvm-project/commit/d96f526196ac4cebfdd318473816f6d4b9d76707.diff

[clang] 4a72459 - Revert "[clang][test] Disallow using the default module cache path in lit tests"

2022-09-12 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-09-12T13:10:22-07:00 New Revision: 4a72459ed639e3eb7188565c758181c43d3192aa URL: https://github.com/llvm/llvm-project/commit/4a72459ed639e3eb7188565c758181c43d3192aa DIFF: https://github.com/llvm/llvm-project/commit/4a72459ed639e3eb7188565c758181c43d3192aa.diff

[clang] [clang][modules] Avoid modules diagnostics for `__has_include()` (PR #71450)

2023-11-06 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/71450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][DepScan] Make OptimizeArgs a bit mask enum and enable by default (PR #71588)

2023-11-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/71588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "Reland [clang] Canonicalize system headers in dependency file when -canonical-prefixes" (PR #71697)

2023-11-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/71697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Skip writing `DIAG_PRAGMA_MAPPINGS` record (PR #70874)

2023-11-09 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/70874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanner] Remove all warning flags when suppressing warnings (PR #71612)

2023-11-10 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/71612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-06 Thread Ben Langmuir via cfe-commits
@@ -157,6 +157,25 @@ #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]] #endif +// clang-format off +#if defined(__clang__) || defined(__GNUC__) +#define LLVM_IGNORE_DEPRECATIONS_OF_DECLARATIONS_BEGIN \ benlangmuir wrote: I'm not s

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-06 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/74892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Ben Langmuir via cfe-commits
@@ -441,22 +434,19 @@ void ModuleManager::visit(llvm::function_ref Visitor, bool ModuleManager::lookupModuleFile(StringRef FileName, off_t ExpectedSize, time_t ExpectedModTime, OptionalFileEntryRef &File

[clang] [clang] NFCI: Make `ModuleFile::File` non-optional (PR #74892)

2023-12-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/74892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang] NFC: Remove `OptionalDirectoryEntryRefDegradesToDirectoryEntryPtr` (PR #74900)

2023-12-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. Nice simplification https://github.com/llvm/llvm-project/pull/74900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [clang] NFC: Remove `OptionalFileEntryRefDegradesToFileEntryPtr` (PR #74899)

2023-12-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/74899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] NFC: Remove `{File, Directory}Entry::getName()` (PR #74910)

2023-12-11 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/74910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-30 Thread Ben Langmuir via cfe-commits
@@ -666,13 +666,19 @@ static StringRef makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path, } void ModuleDepCollector::addFileDep(StringRef Path) { - llvm::SmallString<256> Storage; - Path = makeAbsoluteAndPreferred(ScanInstance, Path, Storage); + // Within P1689

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/69551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/69975 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Don't prevent translation of FW_Private includes when explicitly building FW (PR #70714)

2023-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/70714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix sorting header paths (PR #73323)

2023-11-28 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: You could try using `clang -cc1 -E -x c-module-map` which calls `Module::print`. To trigger this code path you can follow the pattern in `darwin_specific_modulemap_hacks.m`, ie create a module like ``` $ touch Tcl/x1.h $ touch Tcl/x2.h $ cat Tcl/module.modulemap module Tcl {

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/73734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
@@ -4997,6 +4997,19 @@ ASTReader::ASTReadResult ASTReader::readUnhashedControlBlockImpl( F->SearchPathUsage[I] = true; break; } +case VFS_USAGE: { + if (!F) +break; + unsigned Count = Record[0]; + const char *Byte = Blob.data();

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: It's odd to me that tracking is enabled by default. I would have expected tracking be off by default and enabled explicitly for scanning. Similarly, in the modulemap case it could save-and-restore rather than enable the tracking if it was previously o

[clang] [llvm] [clang][DependencyScanner] Remove unused -ivfsoverlay files (PR #73734)

2023-11-29 Thread Ben Langmuir via cfe-commits
@@ -498,11 +518,18 @@ class NamedNodeOrError { } // namespace detail /// An in-memory file system. -class InMemoryFileSystem : public FileSystem { +class InMemoryFileSystem : public RTTIExtends { std::unique_ptr Root; std::string WorkingDirectory; bool UseNormalizedPa

[clang] [clang][DependencyScanner] Include the working directory in the context hash (PR #73719)

2023-11-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/73719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eab2a06 - Revert "Reland "[X86] Support `_Float16` on SSE2 and up""

2022-06-28 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-06-28T10:59:03-07:00 New Revision: eab2a06f0fde51eee6b1526bd301d60c4cc9b050 URL: https://github.com/llvm/llvm-project/commit/eab2a06f0fde51eee6b1526bd301d60c4cc9b050 DIFF: https://github.com/llvm/llvm-project/commit/eab2a06f0fde51eee6b1526bd301d60c4cc9b050.diff

[clang] 67a84ec - [clang] Cleanup ASTContext before output files in crash recovery for modules

2022-07-07 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-07-07T10:23:57-07:00 New Revision: 67a84ec8105e590159b6303a1f0e3cb77c02b5fe URL: https://github.com/llvm/llvm-project/commit/67a84ec8105e590159b6303a1f0e3cb77c02b5fe DIFF: https://github.com/llvm/llvm-project/commit/67a84ec8105e590159b6303a1f0e3cb77c02b5fe.diff

[clang] 0287170 - [clang][deps] Include canonical invocation in ContextHash

2022-07-28 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-07-28T12:24:06-07:00 New Revision: 02871701400253a49de502a5fef770f92772f6bc URL: https://github.com/llvm/llvm-project/commit/02871701400253a49de502a5fef770f92772f6bc DIFF: https://github.com/llvm/llvm-project/commit/02871701400253a49de502a5fef770f92772f6bc.diff

[clang] b4c6dc2 - [clang] Update code that assumes FileEntry::getName is absolute NFC

2022-08-01 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-01T14:48:37-07:00 New Revision: b4c6dc2e66370d94ff52075c2710a674d8e1e0f8 URL: https://github.com/llvm/llvm-project/commit/b4c6dc2e66370d94ff52075c2710a674d8e1e0f8 DIFF: https://github.com/llvm/llvm-project/commit/b4c6dc2e66370d94ff52075c2710a674d8e1e0f8.diff

[clang] 98cf745 - [clang] Only modify FileEntryRef names that are externally remapped

2022-08-01 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-01T15:45:51-07:00 New Revision: 98cf745a032ea0d29fbddaa204760d4e823c237f URL: https://github.com/llvm/llvm-project/commit/98cf745a032ea0d29fbddaa204760d4e823c237f DIFF: https://github.com/llvm/llvm-project/commit/98cf745a032ea0d29fbddaa204760d4e823c237f.diff

[clang-tools-extra] 54110b8 - Fix use-after-free in clang-apply-replacements

2022-08-02 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-02T13:34:20-07:00 New Revision: 54110b8aa01073c428c636951511c2dc710c4a32 URL: https://github.com/llvm/llvm-project/commit/54110b8aa01073c428c636951511c2dc710c4a32 DIFF: https://github.com/llvm/llvm-project/commit/54110b8aa01073c428c636951511c2dc710c4a32.diff

[clang] 6a79e2f - [clang] Add FileEntryRef::getNameAsRequested()

2022-08-03 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-03T09:41:08-07:00 New Revision: 6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37 URL: https://github.com/llvm/llvm-project/commit/6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37 DIFF: https://github.com/llvm/llvm-project/commit/6a79e2ff1989b48f4a8ebf3ac51092eb8ad29e37.diff

[clang] d038bb1 - [clang] Fix redirection behaviour for cached FileEntryRef

2022-08-05 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-05T12:23:38-07:00 New Revision: d038bb196c51dcf80cbe771f4229b4e227c6c5b6 URL: https://github.com/llvm/llvm-project/commit/d038bb196c51dcf80cbe771f4229b4e227c6c5b6 DIFF: https://github.com/llvm/llvm-project/commit/d038bb196c51dcf80cbe771f4229b4e227c6c5b6.diff

[clang] fb89cc0 - [clang][modules] Don't depend on sharing FileManager during module build

2022-08-05 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-05T12:24:40-07:00 New Revision: fb89cc0ddbd9a588ee15148451e7d0bcbc1ef411 URL: https://github.com/llvm/llvm-project/commit/fb89cc0ddbd9a588ee15148451e7d0bcbc1ef411 DIFF: https://github.com/llvm/llvm-project/commit/fb89cc0ddbd9a588ee15148451e7d0bcbc1ef411.diff

[clang] 33af4b2 - [clang][deps] Stop sharing FileManager across module builds in scanner

2022-08-08 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-08T12:13:54-07:00 New Revision: 33af4b22f8ea5dc8340002833802be95ae9f83a1 URL: https://github.com/llvm/llvm-project/commit/33af4b22f8ea5dc8340002833802be95ae9f83a1 DIFF: https://github.com/llvm/llvm-project/commit/33af4b22f8ea5dc8340002833802be95ae9f83a1.diff

[clang] 6626f6f - [clang][deps] Override dependency and serialized diag files for modules

2022-07-12 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-07-12T08:19:52-07:00 New Revision: 6626f6fec3d37b78b628b858bdadbbb8301e1a2f URL: https://github.com/llvm/llvm-project/commit/6626f6fec3d37b78b628b858bdadbbb8301e1a2f DIFF: https://github.com/llvm/llvm-project/commit/6626f6fec3d37b78b628b858bdadbbb8301e1a2f.diff

[clang] 3ce78cb - [clang][deps] Fix handling of -MT in module command-line

2022-07-13 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-07-13T13:36:15-07:00 New Revision: 3ce78cbd2392d7c98f97d1d424cd7ff582fc28f8 URL: https://github.com/llvm/llvm-project/commit/3ce78cbd2392d7c98f97d1d424cd7ff582fc28f8 DIFF: https://github.com/llvm/llvm-project/commit/3ce78cbd2392d7c98f97d1d424cd7ff582fc28f8.diff

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stdarg.h and stddef.h and their - // accompanying modules. - if (Requested->getTopLevelModuleName()

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: >> I'm not excited by the complexity we are moving toward with the builtin >> headers. But I don't have any alternatives. > When -fbuiltin-headers-in-system-modules goes away, things become simpler > than they were since modules were introduced. Even for the case with `-fbui

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stdarg.h and stddef.h and their - // accompanying modules. - if (Requested->getTopLevelModuleName()

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
@@ -301,10 +301,9 @@ bool Module::directlyUses(const Module *Requested) { if (Requested->isSubModuleOf(Use)) return true; - // Anyone is allowed to use our builtin stdarg.h and stddef.h and their - // accompanying modules. - if (Requested->getTopLevelModuleName()

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-13 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Lazy dependency directives (PR #86347)

2024-03-22 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/86347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Ben Langmuir via cfe-commits
@@ -1337,9 +1337,24 @@ static bool compileModule(CompilerInstance &ImportingInstance, // Get or create the module map that we'll use to build this module. ModuleMap &ModMap = ImportingInstance.getPreprocessor().getHeaderSearchInfo().getModuleMap(); + SourceManager &So

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-25 Thread Ben Langmuir via cfe-commits
@@ -71,6 +71,7 @@ // CHECK-NEXT: "context-hash": "{{.*}}", // CHECK-NEXT: "file-deps": [ // CHECK-NEXT: "[[PREFIX]]/first/module.modulemap", +// CHECK-NEXT: "[[PREFIX]]/second/module.modulemap", benlangmuir wrote: Why did this chang

[clang] [clang][modules] Avoid calling expensive `SourceManager::translateFile()` (PR #86216)

2024-03-28 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. Thanks for explaining; LGTM https://github.com/llvm/llvm-project/pull/86216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: What does `OnCI` mea

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -736,6 +736,19 @@ class Preprocessor { State ConditionalStackState = Off; } PreambleConditionalStack; + /// Function for getting the dependency preprocessor directives of a file. + /// + /// These are directives derived from a special form of lexing where the + //

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
@@ -34,12 +34,17 @@ class InitOnlyAction : public FrontendAction { /// Preprocessor-based frontend action that also loads PCH files. class ReadPCHAndPreprocessAction : public FrontendAction { + llvm::function_ref OnCI; benlangmuir wrote: My concern is that n

[clang] [clang] Move state out of `PreprocessorOptions` (1/n) (PR #86358)

2024-03-28 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/86358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move state out of `PreprocessorOptions` (2/n) (PR #87099)

2024-03-29 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/87099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/81061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
@@ -2265,7 +2265,6 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport( UsableHeaderUnit = true; else if (!IsImportDecl) { // This is a Header Unit that we do not include-translate - SuggestedModule = ModuleMap::KnownHeader(); SM

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: It would be good to update your commit message to talk about the benefits of this change: the callback now provides more information about the included header and models the associated module accurately regardless of whether it is translated to an impo

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
@@ -127,8 +127,12 @@ class PPCallbacks { /// \param RelativePath The path relative to SearchPath, at which the include /// file was found. This is equal to FileName except for framework includes. /// - /// \param Imported The module, whenever an inclusion directive was -

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
@@ -127,8 +127,12 @@ class PPCallbacks { /// \param RelativePath The path relative to SearchPath, at which the include /// file was found. This is equal to FileName except for framework includes. /// - /// \param Imported The module, whenever an inclusion directive was -

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir deleted https://github.com/llvm/llvm-project/pull/81061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
@@ -127,8 +127,12 @@ class PPCallbacks { /// \param RelativePath The path relative to SearchPath, at which the include /// file was found. This is equal to FileName except for framework includes. /// - /// \param Imported The module, whenever an inclusion directive was -

[clang] [clang-tools-extra] [clang][lex] Always pass suggested module to `InclusionDirective()` callback (PR #81061)

2024-02-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/81061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Fix dependency scanning with -working-directory (PR #84525)

2024-03-08 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir created https://github.com/llvm/llvm-project/pull/84525 Stop overriding -working-directory to CWD during argument parsing, which should no longer necessary after we set the VFS working directory, and set FSOpts correctly after parsing arguments so that working-di

[clang] [clang][deps] Fix dependency scanning with -working-directory (PR #84525)

2024-03-11 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > I can see a situation where we ask FileManager about the same relative path > before and after setting the parsed FileSystemOptions. The second call would > blindly return the cached result, effectively ignoring -working-directory for > that file. The driver calls `VFS->s

[clang] [clang][deps] Fix dependency scanning with -working-directory (PR #84525)

2024-03-11 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: I don't think there's a difference we can test for here -- the VFS WD shouldn't be modified after the driver sets it and before the FM is used here, so it would be identical to `-working-directory` during the critical window. But I agree recreating the FileManager is probab

[clang] [clang][deps] Fix dependency scanning with -working-directory (PR #84525)

2024-03-11 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir updated https://github.com/llvm/llvm-project/pull/84525 >From 24e2454b90c2aaabb999e84240d5b2263ff01719 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Fri, 8 Mar 2024 09:53:42 -0800 Subject: [PATCH] [clang][deps] Fix dependency scanning with -working-directory

[clang] [clang][deps] Fix dependency scanning with -working-directory (PR #84525)

2024-03-12 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir closed https://github.com/llvm/llvm-project/pull/84525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-12 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/84285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-28 Thread Ben Langmuir via cfe-commits
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions &DiagOpts) { DiagOpts.ShowCarets = false; // Don't write out diagnostic file. DiagOpts.DiagnosticSerializationFile.clear(); - // Don't emit warnings as errors (and all other warnings too). - DiagOpts.Ig

[clang] [llvm] [clang][ScanDeps] Allow PCHs to have different VFS overlays (PR #82294)

2024-02-28 Thread Ben Langmuir via cfe-commits
@@ -175,8 +192,19 @@ static void sanitizeDiagOpts(DiagnosticOptions &DiagOpts) { DiagOpts.ShowCarets = false; // Don't write out diagnostic file. DiagOpts.DiagnosticSerializationFile.clear(); - // Don't emit warnings as errors (and all other warnings too). - DiagOpts.Ig

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-19 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: Is the issue with MDC's FileDeps that we are calling `makeAbsoluteAndPreferred` on the paths? Maybe we could instead move that call into `FullDependencyConsumer`. Or are there other issues? The fact we need to add additional `MDC.IsStdModuleP1689Form

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-23 Thread Ben Langmuir via cfe-commits
@@ -2944,6 +2944,10 @@ def fno_modules_validate_textual_header_includes : MarshallingInfoNegativeFlag>, HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. " "This flag will be removed in a future Clang release.">; +d

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-23 Thread Ben Langmuir via cfe-commits
@@ -1212,9 +1212,12 @@ void ASTWriter::writeUnhashedControlBlock(Preprocessor &PP, Record.clear(); } + const auto &HSOpts = PP.getHeaderSearchInfo().getHeaderSearchOpts(); + // Diagnostic options. const auto &Diags = Context.getDiagnostics(); const DiagnosticO

[clang] [clang][deps] Skip slow `UNHASHED_CONTROL_BLOCK` records (PR #69975)

2023-10-23 Thread Ben Langmuir via cfe-commits
@@ -2944,6 +2944,10 @@ def fno_modules_validate_textual_header_includes : MarshallingInfoNegativeFlag>, HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. " "This flag will be removed in a future Clang release.">; +d

[clang] [clang][deps] Fix `__has_include` behavior with umbrella headers (PR #70144)

2023-10-24 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir commented: Can you clarify how this bug occurs in terms of what information about the header is stored that causes us to get the wrong module? It seems bad that passing `nullptr` to `LookupFile` could cause incorrect behaviour and makes me wonder if we need to al

[clang] [clang] use relative paths for builtin headers during module compilation (PR #68023)

2023-10-25 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: Thanks for your patience, I should have looked at this sooner. The change to our downstream test looks expected; the `` buffer changed ```diff -#import "/^tc/lib/clang/18/include/stdbool.h" +#import "stdbool.h" ``` But the actual resolution of which header is used is identica

[clang] [clang][deps] Fix `__has_include` behavior with umbrella headers (PR #70144)

2023-10-25 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. > Yeah. I did try to fix up all calls to LookupFile to perform module map > lookup, but a bunch of tests started failing (mostly standard C++ modules > tests IIRC), so there's probably more nuance required there. Okay, I do think this

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-26 Thread Ben Langmuir via cfe-commits
@@ -230,6 +251,26 @@ class DependencyScanningFilesystemLocalCache { assert(InsertedEntry == &Entry && "entry already present"); return *InsertedEntry; } + + /// Returns real path associated with the filename or nullptr if none is + /// found. + const CachedRealPath

[clang] [clang][deps] Cache `VFS::getRealPath()` (PR #68645)

2023-10-26 Thread Ben Langmuir via cfe-commits
@@ -168,6 +170,12 @@ class DependencyScanningFilesystemSharedCache { /// The backing storage for cached contents. llvm::SpecificBumpPtrAllocator ContentsStorage; +/// Map from filenames to cached real paths. +llvm::StringMap RealPathsByFilename; ---

[clang] [clang-scan-deps] [P1689] Keep consistent behavior for make dependencies with clang (PR #69551)

2023-10-27 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: Thanks for the ping, I had missed your question > How do you think about the idea to add a flag to the MDC about whether or not > calling makeAbsoluteAndPreferred? SGTM; this seems like a good compromise since we can't easily extract this into the consumer. https://github.

r311053 - [index] Add indexing for unresolved-using declarations

2017-08-16 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Aug 16 16:12:21 2017 New Revision: 311053 URL: http://llvm.org/viewvc/llvm-project?rev=311053&view=rev Log: [index] Add indexing for unresolved-using declarations In dependent contexts we end up referencing these, so make sure they have USRs, and have their declarati

[clang] 773ad55 - [index] Fix performance regression with indexing macros

2021-06-16 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2021-06-16T10:16:26-07:00 New Revision: 773ad55a393f368cc92b1611c52e493ed45a353f URL: https://github.com/llvm/llvm-project/commit/773ad55a393f368cc92b1611c52e493ed45a353f DIFF: https://github.com/llvm/llvm-project/commit/773ad55a393f368cc92b1611c52e493ed45a353f.diff

[clang] 211f5af - [clang] Move getenv call for SOURCE_DATE_EPOCH out of frontend NFC

2022-10-26 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-26T12:42:56-07:00 New Revision: 211f5af38af1810925343bb71d90ca8485e66300 URL: https://github.com/llvm/llvm-project/commit/211f5af38af1810925343bb71d90ca8485e66300 DIFF: https://github.com/llvm/llvm-project/commit/211f5af38af1810925343bb71d90ca8485e66300.diff

[clang] e1f9983 - Move getenv for AS_SECURE_LOG_FILE to clang

2022-10-28 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-28T16:08:04-07:00 New Revision: e1f998302276cf227de6c6029ea25b2dbb84f3d8 URL: https://github.com/llvm/llvm-project/commit/e1f998302276cf227de6c6029ea25b2dbb84f3d8 DIFF: https://github.com/llvm/llvm-project/commit/e1f998302276cf227de6c6029ea25b2dbb84f3d8.diff

[clang] fd35e15 - [clang][test] Require x86 target in a couple new tests

2022-10-28 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-28T17:00:18-07:00 New Revision: fd35e1506011fca925661312315b14f169a2e82a URL: https://github.com/llvm/llvm-project/commit/fd35e1506011fca925661312315b14f169a2e82a DIFF: https://github.com/llvm/llvm-project/commit/fd35e1506011fca925661312315b14f169a2e82a.diff

[clang] 5482432 - [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-16T14:25:27-07:00 New Revision: 5482432bf6cc7e334894734ebbdac0a97ee98b19 URL: https://github.com/llvm/llvm-project/commit/5482432bf6cc7e334894734ebbdac0a97ee98b19 DIFF: https://github.com/llvm/llvm-project/commit/5482432bf6cc7e334894734ebbdac0a97ee98b19.diff

[clang] 3708a14 - [clang] Pull some utility functions into CompilerInvocation NFC

2022-08-23 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-23T08:18:14-07:00 New Revision: 3708a148421fd0449081b9a91fba28f51f1dfb12 URL: https://github.com/llvm/llvm-project/commit/3708a148421fd0449081b9a91fba28f51f1dfb12 DIFF: https://github.com/llvm/llvm-project/commit/3708a148421fd0449081b9a91fba28f51f1dfb12.diff

[clang] bdc20d6 - [clang][tooling] Allow -cc1 arguments in ToolInvocation

2022-08-24 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-24T19:51:12-07:00 New Revision: bdc20d61b8e4a62ea00e1eb05ba87eefaf820434 URL: https://github.com/llvm/llvm-project/commit/bdc20d61b8e4a62ea00e1eb05ba87eefaf820434 DIFF: https://github.com/llvm/llvm-project/commit/bdc20d61b8e4a62ea00e1eb05ba87eefaf820434.diff

[clang] e8febb2 - [clang][deps] Remove CompilerInvocation from ModuleDeps

2022-08-24 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-24T19:51:12-07:00 New Revision: e8febb23a07bde8c02aee5545a0206e6f3851237 URL: https://github.com/llvm/llvm-project/commit/e8febb23a07bde8c02aee5545a0206e6f3851237 DIFF: https://github.com/llvm/llvm-project/commit/e8febb23a07bde8c02aee5545a0206e6f3851237.diff

[clang] c0a5512 - [clang][deps] Minor ModuleDepCollector refactorings NFC

2022-08-25 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-08-25T06:51:06-07:00 New Revision: c0a55121618b2f3f5db613cfb0d104a9ae2b700e URL: https://github.com/llvm/llvm-project/commit/c0a55121618b2f3f5db613cfb0d104a9ae2b700e DIFF: https://github.com/llvm/llvm-project/commit/c0a55121618b2f3f5db613cfb0d104a9ae2b700e.diff

[clang] 5ea78c4 - [clang] Update ModuleMap::getModuleMapFile* to use FileEntryRef

2022-10-05 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-05T13:12:43-07:00 New Revision: 5ea78c4113f8d2c8be24152f2dd0cadaea352c9d URL: https://github.com/llvm/llvm-project/commit/5ea78c4113f8d2c8be24152f2dd0cadaea352c9d DIFF: https://github.com/llvm/llvm-project/commit/5ea78c4113f8d2c8be24152f2dd0cadaea352c9d.diff

[clang] 074fcec - [clang][deps] Canonicalize module map path

2022-10-05 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-05T15:42:38-07:00 New Revision: 074fcec1eabfc992c46c95df215b1caf5cf58970 URL: https://github.com/llvm/llvm-project/commit/074fcec1eabfc992c46c95df215b1caf5cf58970 DIFF: https://github.com/llvm/llvm-project/commit/074fcec1eabfc992c46c95df215b1caf5cf58970.diff

[clang] 8d9a3a6 - [clang][test] Make headers unique to avoid linking issues

2022-10-06 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-10-06T10:09:22-07:00 New Revision: 8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa URL: https://github.com/llvm/llvm-project/commit/8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa DIFF: https://github.com/llvm/llvm-project/commit/8d9a3a6b9bd10f294d0e5adb0972a1ed8845e4aa.diff

[clang] 05ec16d - [clang][deps] Avoid leaking modulemap paths across unrelated imports

2022-11-15 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-11-15T13:59:26-08:00 New Revision: 05ec16d90deb747414c8534f98617d25d90bb714 URL: https://github.com/llvm/llvm-project/commit/05ec16d90deb747414c8534f98617d25d90bb714 DIFF: https://github.com/llvm/llvm-project/commit/05ec16d90deb747414c8534f98617d25d90bb714.diff

[clang] dcfb250 - [clang][deps] Remove checks that were just for exhaustiveness

2022-11-15 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-11-15T14:22:23-08:00 New Revision: dcfb25078c2629450b393e696b9760721a9f URL: https://github.com/llvm/llvm-project/commit/dcfb25078c2629450b393e696b9760721a9f DIFF: https://github.com/llvm/llvm-project/commit/dcfb25078c2629450b393e696b9760721a9f.diff

[clang] c4436f6 - [clang] Use InMemoryModuleCache for readASTFileControlBlock NFC

2022-11-17 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-11-17T13:47:46-08:00 New Revision: c4436f675d8f5903303fc13d2c2eff2c5800d49b URL: https://github.com/llvm/llvm-project/commit/c4436f675d8f5903303fc13d2c2eff2c5800d49b DIFF: https://github.com/llvm/llvm-project/commit/c4436f675d8f5903303fc13d2c2eff2c5800d49b.diff

[clang] 43854fa - [clang][deps] Add module files for input dependencies earlier

2023-01-24 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2023-01-24T08:45:20-08:00 New Revision: 43854fa263d2c96aa9e6c2bc5eafd66ac9727641 URL: https://github.com/llvm/llvm-project/commit/43854fa263d2c96aa9e6c2bc5eafd66ac9727641 DIFF: https://github.com/llvm/llvm-project/commit/43854fa263d2c96aa9e6c2bc5eafd66ac9727641.diff

[clang] 0245dcc - [clang][test] Remove check that fails if SOURCE_DATE_EPOCH is set globally

2023-01-24 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2023-01-24T16:00:56-08:00 New Revision: 0245dcc000faf4f6dea9552a44106c8921df841e URL: https://github.com/llvm/llvm-project/commit/0245dcc000faf4f6dea9552a44106c8921df841e DIFF: https://github.com/llvm/llvm-project/commit/0245dcc000faf4f6dea9552a44106c8921df841e.diff

  1   2   3   4   5   >