[PATCH] D90053: Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, teemperor. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Change the `InputFile` class to store a `MaybeFileEntryRef` instead of `FileEntry*`. This paged in a few API changes:

[PATCH] D89554: SourceManager: Clarify that FileInfo always has a ContentCache, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG74a878348021: SourceManager: Clarify that FileInfo always has a ContentCache, NFC (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89554?vs=298

[PATCH] D89580: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added inline comments. Comment at: clang/include/clang/Basic/SourceManager.h:293 X.ContentAndKind.setInt(FileCharacter); - X.Filename = Filename; + const_cast(Con).Filename = Filename; return X; -

[PATCH] D89913: SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/SourceManager.h:118 + private: +unsigned *Storage = nullptr; + }; JDevlieghere wrote: > I guess it's implicit in the implementation, but maybe it's worth adding a > comment describing

[PATCH] D89913: SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdbbc4f4e226b: SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82756#2350233 , @jansvoboda11 wrote: > Correct me if I'm wrong, but when generating the command line, all "implied" > flags would be hidden, even if they were explicit in the original comand line: > > - original command li

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. IOW, the goal of formalizing would just be to: - error if the `.td` file defined options in the wrong order to get correct parsing - automatically generate the code for default value, instead of having to re-type the name of the keypath CHANGES SINCE LAST ACTION

[PATCH] D69844: [clang][Basic] Integrate SourceLocation with FoldingSet, NFCI

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Analysis/PathDiagnostic.cpp:1088 + ID.Add(Range.getEnd()); + ID.Add(static_cast(Loc)); } I'm surprised you need this `static_cast`, can you explain why it was necessary? Repository: rG LLVM Github Mon

[PATCH] D89914: SourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache mutable, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5431c37b55e2: SourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache… (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89

[PATCH] D89922: SourceManager: Simplify by inlining what remains of ComputeLineNumbers, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf52a85ddc9b: SourceManager: Simplify by inlining what remains of ComputeLineNumbers, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D90067: SourceManager: Return non-const references in getOrCreateContentCache and related, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Update a few APIs to return non-const references instead of pointers, and remove associated `const_cast`s and non-null assertions. https

[PATCH] D89580: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300377. dexonsmith added a comment. Rebased on top of https://reviews.llvm.org/D89580, which implements @JDevlieghere's suggestion. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89580/new/ https://reviews.llvm.org/D89580 Files: clang/include/

[PATCH] D90079: CGLoopInfo: Avoid unnecessary uses of `MDNode::getTemporary`, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: dblaikie, aprantl. Herald added a reviewer: bollu. Herald added subscribers: ributzka, hiraditya, kristof.beyls. Herald added a project: LLVM. dexonsmith requested review of this revision. `TempMDNode` includes a bunch of machinery for

[PATCH] D90079: CGLoopInfo: Avoid unnecessary uses of `MDNode::getTemporary`, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. https://github.com/llvm/llvm-project/blob/master/llvm/lib/IR/Metadata.cpp#L716 is where the auto-detection of self-references is: // Drop uniquing for self-reference cycles and deleted constants. if (New == this || (!New && Old && isa(Old))) { if (!isResolved(

[PATCH] D90079: CGLoopInfo: Avoid unnecessary uses of `MDNode::getTemporary`, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. BTW, this is a long-delayed follow-up to 5e5b85098dbeaea2cfa5d01695b5d2982634d7dd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90079/new/ https://reviews.llvm.org/D90079 ___ cfe-commits mailing list cfe-commits@

[PATCH] D89521: FileManager: Reorder declarations of FileEntry and FileEntryRef, NFC

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG81ac81f8644a: FileManager: Reorder declarations of FileEntry and FileEntryRef, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D89580: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for the review! @JDevlieghere, let me know if the updated patch looks good to you too (also the prep commit). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89580/new/ https://reviews.llvm.org/D89580 ___ cfe

[PATCH] D89514: clangd: Stop calling FileEntryRef::FileEntryRef

2020-10-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked an inline comment as done. dexonsmith added a comment. Committed in 434f3774f629f5896614e9efb4eda82d813402ed . Comment at: clang-tools-extra/clangd/ParsedAST.cpp:222 if (File)

[PATCH] D69844: [clang][Basic] Integrate SourceLocation with FoldingSet, NFCI

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/Analysis/PathDiagnostic.cpp:1088 + ID.Add(Range.getEnd()); + ID.Add(static_cast(Loc)); } miyuki wrote: > dexonsmith wr

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added a comment. In D89749#2353651 , @v.g.vassilev wrote: > Thanks for the patch!! This is a super hot place for us (mostly due to > boost). I will try it on our end and let you know! Great! In D8

[PATCH] D89498: HeaderSearch: Simplify use of FileEntryRef in HeaderSearch::LookupFile, NFC

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I committed this on Friday as 74910cbbd8d1df824ab1d5e742c50641d0fee907 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89498/new/ https://reviews.llvm.org/D89498 __

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300722. dexonsmith edited the summary of this revision. dexonsmith added a comment. Made the planned changes to SourceManager, wrapping the index in `LoadedSLocEntryIndex` which acts like an `Optional` (but still using 0 for a sentinel to allow zero-initi

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added a comment. I still need to investigate the LLDB test failures related to `ASTImporter`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89749/new/ https://reviews.llvm.org/D89749 ___

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added a comment. In D89749#2354072 , @dexonsmith wrote: > I still need to investigate the LLDB test failures related to `ASTImporter`. (still to-do) CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300737. dexonsmith added a comment. Added a unit test for `LoadedSLocEntryIndex`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89749/new/ https://reviews.llvm.org/D89749 Files: clang/include/clang/Basic/SourceManager.h clang/lib/Basic/Sourc

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300740. dexonsmith added a comment. Fix name of `LoadedSLocEntryIndices` (I documented it with this name, but was using `SLocEntryIndices` previously). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89749/new/ https://reviews.llvm.org/D89749 Fil

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added a comment. (still need to investigate ASTImporter) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89749/new/ https://reviews.llvm.org/D89749 ___ cfe-commits mailing list cfe-commits

[PATCH] D90067: SourceManager: Return non-const references in getOrCreateContentCache and related, NFC

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0387015d7549: SourceManager: Return non-const references in getOrCreateContentCache and… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89749#2353602 , @teemperor wrote: > The tests are just loading a Clang module and then trying to import some > Decls into another ASTContext, so I don't think the error here is specific to > LLDB. We just don't have any AS

[PATCH] D89580: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22e6b1863e74: SourceManager: Fix an SLocEntry memory regression introduced with FileEntryRef (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D90079: Avoid unnecessary uses of `MDNode::getTemporary`, NFC

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4c667c9af03: Avoid unnecessary uses of `MDNode::getTemporary`, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D90192: WIP: Speculative fix for ASTImporter crash with SLocEntry changes

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: teemperor. Herald added subscribers: ributzka, martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. dexonsmith requested review of this revision. This is a speculative fix for the ASTImporter crash in https://

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @teemperor, I don't get test failures: % (cd build && env LIT_FILTER=Modules ninja -k20 check-lldb) ld: warning: spew Testing Time: 10.54s Excluded : 2105 Unsupported: 17 Passed : 13 Could this be because I used `-DLLDB_USE_SYSTEM_DEBUGS

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300791. dexonsmith added a comment. Adding a test for multi-level indirection. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89488/new/ https://reviews.llvm.org/D89488 Files: clang/include/clang/Basic/FileManager.h clang/lib/Basic/FileManage

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:219 + return FileEntryRef(*SeenFileInsertResult.first); +return FileEntryRef(*Value.V.get()); } arphaman wrote: > It looks like

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 300811. dexonsmith added a comment. Updated to address remaining review comments. Note that we discussed double-redirection use case offline, and agreed it doesn't come up in practice (even with multiple RedirectingFileSystem layers) so we shouldn't supp

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked 3 inline comments as done. dexonsmith added inline comments. Comment at: clang/lib/Basic/FileManager.cpp:217 FileEntry *FE; -if (LLVM_LIKELY(FE = Value.dyn_cast())) - return FileEntryRef(SeenFileInsertResult.first->first(), *FE); -return getFil

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89749#2354386 , @dexonsmith wrote: > That means it's not safe to store an address from `getSLocEntry` when there > will be another call. I can update `ASTImporter` to use a copy, but I think > this is too much of a gotcha.

[PATCH] D89748: SourceManager: Use the same fake SLocEntry whenever it fails to load

2020-10-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaab50af8c18a: SourceManager: Use the same fake SLocEntry whenever it fails to load (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89748?vs=29

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. I like how this is coming together. I have a few comments inline. Also, I wonder if there should be a test for the new OptParser behaviour in `llvm/unittests/Option/`. ===

[PATCH] D89749: SourceManager: Don't allocate an SLocEntry until it's loaded

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89749#2356846 , @v.g.vassilev wrote: > Is the performance overhead for loaded module a % of the overall size of the > source files? `SourceManager::PrintStats` almost has the information you need. One of the lines is:

[PATCH] D89834: FileManager: Improve the FileEntryRef API and add MaybeFileEntryRef

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89834#2356769 , @arphaman wrote: > What's wrong with using `Optional` instead of > `MaybeFileEntryRef`? Two problems: 1. `const FileEntry*` is stored in lots of places. I am nervous after the memory regression from `File

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dexonsmith marked 2 inline comments as done. Closed by commit rG917acac960d4: FileManager: Shrink FileEntryRef to the size of a pointer (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: htt

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize Optional

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301138. dexonsmith retitled this revision from "FileManager: Improve the FileEntryRef API and add MaybeFileEntryRef" to "FileManager: Improve the FileEntryRef API and customize Optional". dexonsmith edited the summary of this revision. dexonsmith added a c

[PATCH] D89836: Change Module::ASTFile and ModuleFile::File => Optional, NFC

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301146. dexonsmith retitled this revision from "Change Module::ASTFile and ModuleFile::File => MaybeFileEntryRef, NFC" to "Change Module::ASTFile and ModuleFile::File => Optional, NFC". dexonsmith edited the summary of this revision. dexonsmith added a com

[PATCH] D90053: Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301148. dexonsmith edited the summary of this revision. dexonsmith added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90053/new/ https://reviews.llvm.org/D90053 Files: clang/include/clang/Basic/FileManager.h clang/include

[PATCH] D89488: FileManager: Shrink FileEntryRef to the size of a pointer

2020-10-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/FileManager.h:101 + /// Type used in the StringMap. + using MapEntry = llvm::StringMapEntry>; + thakis wrote: > thakis wrote: > > It looks like this is too clever for gcc5.3: > > https://b

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize Optional

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89834#2357910 , @dexonsmith wrote: > Dropped `MaybeFileEntryRef`, instead customizing `Optional`. As @arphaman pointed out offline, we can actually `OptionalStorage` instead, by adding add a private constructor to `FileEnt

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301394. dexonsmith retitled this revision from "FileManager: Improve the FileEntryRef API and customize Optional" to "FileManager: Improve the FileEntryRef API and customize its OptionalStorage". dexonsmith edited the summary of this revision. dexonsmith a

[PATCH] D89836: Change Module::ASTFile and ModuleFile::File => Optional, NFC

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301396. dexonsmith added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89836/new/ https://reviews.llvm.org/D89836 Files: clang/include/clang/Basic/FileEntry.h clang/include/clang/Basic/Module.h clang/include/clang/Seria

[PATCH] D90053: Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301399. dexonsmith added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90053/new/ https://reviews.llvm.org/D90053 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Basic/SourceManager.h clang/include/cl

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301402. dexonsmith added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89834/new/ https://reviews.llvm.org/D89834 Files: clang/include/clang/Basic/FileEntry.h clang/unittests/Basic/CMakeLists.txt clang/unittests/Bas

[PATCH] D68997: Allow searching for prebuilt implicit modules.

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @arames, I see you've had a number of commits. I suggest you request commit access: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Comment at: clang/docs/Modules.rst:358 + +This way, a single directory containing multiple variant

[PATCH] D89761: Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG23ed570af1cc: Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89

[PATCH] D89761: Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks @JDevlieghere for the review! This landed in 23ed570af1cc165afea1b70a533a4a39d6656501 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89761/new

[PATCH] D89835: ModuleManager: Simplify lookupModuleFile by only setting the out parameter once, NFC

2020-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG946406aebce2: ModuleManager: Simplify lookupModuleFile by only setting the out parameter once… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-10-29 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82756#2361565 , @jansvoboda11 wrote: > Thanks for the feedback Duncan. > > I don't think this patch introduces any changes the parser. We only change > the way how `CodeGenOpts` and `LangOpts` get populated when using >

[PATCH] D89761: Split out llvm/Support/FileSystem/UniqueID.h and clang/Basic/FileEntry.h, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: llvm/include/llvm/Support/FileSystem/UniqueID.h:36 + bool operator<(const UniqueID &Other) const { +return std::tie(Device, File) < std::tie(Other.Device, Other.File); + } rnk wrote: > FYI std::tie is pretty exp

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks for working through this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82756/new/ https://reviews.llvm.org/D82756 __

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG84e8257937ec: FileManager: Improve the FileEntryRef API and customize its OptionalStorage (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D90478: Basic: Split out DirectoryEntry.h, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Move `DirectoryEntry` and `DirectoryEntryRef` into their own header, similar to the creation of FileEntry.h. No functionality cha

[PATCH] D90481: Basic: Change Module::Umbrella to a PointerUnion, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Change `Module::Umbrella` from a `const void *` to a `PointerUnion` of `FileEntry` and `DirectoryEntry`. We can drop the `HasUmbr

[PATCH] D90484: FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Add `FileEntryRef::getDir`, which returns a `DirectoryEntryRef`. This includes a few changes: - Customize `OptionalStorage` so t

[PATCH] D90485: Lex: Update Module::findHeader to return FileEntryRef, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Update `Module::findHeader` to return `Optional` and fix its one caller. https://reviews.llvm.org/D90485 Files: clang/includ

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/FileEntry.h:186 + + constexpr bool hasValue() const noexcept { +return MaybeRef.hasOptionalValue(); danielkiss wrote: > This broke the build, `constexpr` could be dropped IMHO. > FileEnt

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Just pushed again in ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9 ; bots look happier with this version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D898

[PATCH] D90484: FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 301989. dexonsmith added a comment. Rebased on top of ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90484/new/ https://reviews.llvm.o

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89834#2365358 , @dexonsmith wrote: > Just pushed again in ac49500cd0484e1b2dcf37fa4c0dade6f113c2c9 > ; bots > look happier with this version. Not all of

[PATCH] D90484: FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 302010. dexonsmith added a comment. Rebase on top of 814141f9bd0a64bbedae05773972d140f04f654d . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90484/new/ https://reviews.llvm.or

[PATCH] D90497: Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Push `FileEntryRef` and `DirectoryEntryRef` further, using it them `Module::Umbrella`, `Module::Header::Entry`, and `Module::Dire

[PATCH] D90497: Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC

2020-10-30 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 302022. dexonsmith edited the summary of this revision. dexonsmith added a comment. Removed the `FIXME`s about the `...AsWritten` fields, as I just took a deeper look and we need them. The headers/etc. are looked up in the `FileManager` with the module di

[PATCH] D89836: Change Module::ASTFile and ModuleFile::File => Optional, NFC

2020-11-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9f151df17800: Change Module::ASTFile and ModuleFile::File => Optional, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D89836: Change Module::ASTFile and ModuleFile::File => Optional, NFC

2020-11-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note: the bots revealed I needed another update for some host compilers, which I pushed in 5cb8d93205463f169ad4dd532829147fed2e38d0 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D101667: Modules: Remove ModuleLoader::OtherUncachedFailure, NFC

2021-05-13 Thread Duncan P. N. Exon Smith 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 rG7c2afd5899df: Modules: Remove ModuleLoader::OtherUncachedFailure, NFC (authored by dexonsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D101670: Modules: Rename ModuleBuildFailed => DisableGeneratingGlobalModuleIndex, NFC

2021-05-13 Thread Duncan P. N. Exon Smith 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 rG23e9146fba29: Modules: Rename ModuleBuildFailed => DisableGeneratingGlobalModuleIndex, NFC (authored by dexonsmith). Repository: rG LLVM Github Mo

[PATCH] D101672: Modules: Simplify how DisableGeneratingGlobalModuleIndex is set, likely NFC

2021-05-13 Thread Duncan P. N. Exon Smith 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 rG7c57a9bd7d4c: Modules: Simplify how DisableGeneratingGlobalModuleIndex is set, likely NFC (authored by dexonsmith). Repository: rG LLVM Github Mon

[PATCH] D102473: [clang][deps] NFC: Stop assuming the TU's context hash

2021-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D102473/new/ https://reviews.llvm.org/D102473 __

[PATCH] D102482: [clang][deps] NFC: Report modules' context hash

2021-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, although I'd slightly prefer the change to CompilerInstance.h be split out and committed after. Comment at: clang/include/clang/Frontend/CompilerInstance.h:230

[PATCH] D102488: [clang][deps] Prune unused header search paths

2021-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. The code looks mostly good; some inline comments. I think it'd be useful to have direct tests for "detecting used search paths". That might be a nice thing to separate out an

[PATCH] D102491: [clang][modules] Build inferred modules

2021-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. Looks great — thanks for splitting this out! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102491/new/ https://reviews.llvm.org/D102491

[PATCH] D102495: [clang][deps] Support inferred modules

2021-05-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, thanks for splitting out and moving the tool to clang/utils. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102495/new/ https://rev

[PATCH] D102924: [clang] NFC: Replace std::pair by a struct in InitHeaderSearch

2021-05-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D102924/new/ https://reviews.llvm.org/D102924 __

[PATCH] D102943: Hashing: use a 64-bit storage type on all platforms.

2021-05-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D102943#2774732 , @jroelofs wrote: > why do module hashes need to be stable when cross-compiling? IIUC, the use case is cross-compiling when building the modules, which are then sent to the target to use when compiling oth

[PATCH] D102633: [clang-scan-deps] Improvements to thread usage

2021-05-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: jansvoboda11. dexonsmith added a comment. In D102633#2773578 , @aganea wrote: > In D102633#2769762 , @arphaman > wrote: > >> It might be good for @aganea to take a look as well. > >

[PATCH] D102943: Hashing: use a 64-bit storage type on all platforms.

2021-05-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: jansvoboda11. dexonsmith added a comment. In D102943#2775115 , @pcc wrote: > Isn't the bug here that module hashing is using `hash_code`? So shouldn't the > correct fix be to use a specific hashing algorithm for module hash

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Naively, this sounds like it could be a non-trivial tax on build times. But it looks like it's only called in Clang from `Sema::diagnoseMissingImport`, which only happens on error anyway. Comment at: clang/unittests/Lex/HeaderMapTest.cpp:9 -#incl

[PATCH] D103229: [clang] NFC: split HeaderMapTest to have re-usable header map implementation for testing

2021-05-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM; thanks for splitting this out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103229/new/ https://reviews.llvm.org/D103229 ___

[PATCH] D102943: Hashing: use a 64-bit storage type on all platforms.

2021-05-27 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D102943#2786015 , @arames wrote: > This new version is an attempt to have modules not rely on `llvm::hash_code`, > but on a new `llvm::stable_hash_code`. > I understand modifying `ADT/Hashing.h` is sensitive, so maybe we ne

[PATCH] D102923: [clang][lex] Remark for used header search paths

2021-05-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a comment. This revision now requires changes to proceed. Thanks for your patience! I thought I already looked at this last week. This is looking close. Comments mostly inline, but a high level point: I think this should report syst

[PATCH] D102923: [clang][lex] Remark for used header search paths

2021-06-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:427 +def remark_pp_include_header_search_usage : Remark< + "user-provided search path used: '%0'">, + InGroup>; jansvoboda11 wrote: > dexonsmith wrote: > > I suggest,

[PATCH] D103461: [clang][deps] NFC: Do not adjust the original action

2021-06-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Is there (or could there be) a mode where `clang-scan-deps` prints out the command-lines it sends to the dependency scanning action (maybe instead of actually scanning), so this could be tested? Comment at: clang/tools/clang-scan-deps/ClangScanDeps

[PATCH] D101775: Fix for Bug 50033 - -fno-temp-file is not respected when creating a pch in clang 12

2021-06-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM; thanks for you patience. I've been a bit paralyzed, thinking about whether we could/should add a remark, something like `-Rtemp-file` or `-Routput-file`, which could be triggered

[PATCH] D101775: Fix for Bug 50033 - -fno-temp-file is not respected when creating a pch in clang 12

2021-06-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @zahen , what author information should I use for the Git commit? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101775/new/ https://reviews.llvm.org/D101775 ___ cfe-commits ma

[PATCH] D95099: [clang-scan-deps] : Support -- in clang command lines.

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for splitting this out! The looks good, just a few nits in line below. I also have a question about the test. Comment at: clang/lib/Tooling/Tooling.cpp:440 + // names. + auto ArgsEnd = Args.end(); + for (auto I = Args.begin(), E = Args.end

[PATCH] D92191: [clang-scan-deps] Add support for clang-cl

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92191#2512960 , @saudi wrote: > Removed the support for "--" command lines, it was extracted to patch D95099 > . > Applied suggested fixes. Thanks! @Bigcheese, since you reviewed the origi

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

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D95147/new/ https://reviews.llvm.org/D95147

[PATCH] D70701: Fix more VFS tests on Windows

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. @rnk / @amccarth, I've been looking at the history of `makeAbsolute` being virtual, since it's a bit awkward that `RedirectingFileSystem` behaves differently from the others. I'm hoping you can give me a bit more context. I'm wondering about an alternative implementa

[PATCH] D94844: [VFS] Add support to RedirectingFileSystem for mapping a virtual directory to one in the external FS.

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I don't see a test for a case where the mapped directory already exists in the external FS, something like: # external fs /d1/f1 /d2/f2 # redirect fs from yaml (fallthrough: true) /d1 -> /d2 Unless I just missed it, can you add one? My intuition is we'd

[PATCH] D70701: Fix more VFS tests on Windows

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for the quick and detailed response! Your explanation of hybrid behaviour on Windows was especially helpful, as I didn't fully understand how that worked before. One thing I see, but wasn't obvious from your description, is that the mixed/hybrid separator beh

[PATCH] D95202: ADT: Use 'using' to inherit assign and append in SmallString

2021-01-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: dblaikie. Herald added subscribers: ributzka, hiraditya. dexonsmith requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. Rather than reimplement, use a `using` declaration to br

<    3   4   5   6   7   8   9   10   11   12   >