[PATCH] D90888: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC

2020-11-05 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. `ASTUnit::Parse` sets up the `FileManager` earlier in the same function, ensuring `ASTUnit::getFileManager()` matches `Clang->get

[PATCH] D90887: ARCMigrate: Stop abusing PreprocessorOptions for passing back file remappings, NFC

2020-11-05 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. As part of reducing use of PreprocessorOptions::RemappedFileBuffers, stop abusing it to pass information around remapped files i

[PATCH] D90885: Tooling: Remove dead code for ToolingInvocation::mapVirtualFile

2020-11-05 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. Follows through on c4cb3b10dc8c50e46c9fb1b7ae95e3c3c94975d3's FIXME from 2015. Anyone using this should migrate to InMemoryFileS

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

2020-11-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e73cfa8363d: Basic: Change Module::Umbrella to a PointerUnion, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

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

2020-11-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG77a9e0a4af5a: Basic: Split out DirectoryEntry.h, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D90733: Frontend: Sink named pipe logic from CompilerInstance down to FileManager

2020-11-03 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. Remove compilicated logic from CompilerInstance::InitializeSourceManager to deal with named pipes, updating FileManager::getBuff

[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] 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] 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] 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] 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] 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 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. 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] 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] 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] 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] 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] 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] 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] 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] 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-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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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 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 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] 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] 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] 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] 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] 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] 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 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] 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 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 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 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 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] 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 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] 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] 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] 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] 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] 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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] D89508: SourceManager: getFileEntryRefForID => getNonBuiltinFilenameForID, NFC

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcf593d224c9c: SourceManager: getFileEntryRefForID => getNonBuiltinFilenameForID, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D89507: SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG168db92465c5: SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D89503: SourceManager: Factor out helpers for common SLocEntry lookup pattern, NFC

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6c6daa95d3a: SourceManager: Factor out helpers for common SLocEntry lookup pattern, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D86230: [SourceManager] Skip module maps when searching files for macro arguments

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:1764 if (Entry.isFile()) { - SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc(); + auto File = Entry.getFile(); + if (File.getFileCharacteristic() == C_User_ModuleMap || -

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

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82756#2348159 , @dexonsmith wrote: > I have an idea: use `DEFAULT_VALUE` to keep current behaviour. Here's an > example to demonstrate. Downside of this is that it's error prone, because it requires for correctness (but d

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

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I have an idea: use `DEFAULT_VALUE` to keep current behaviour. Here's an example to demonstrate. `cl_mad_enable` is implied by `OPT_cl_unsafe_math_optimizations` or `OPT_cl_fast_relaxed_math`. Instead of setting the default value to `"false"` it could be set to `"Co

[PATCH] D89445: clang/Basic: Remove ContentCache::getRawBuffer, NFC

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG156e8b37024a: clang/Basic: Remove ContentCache::getRawBuffer, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D69903: [Basic] Introduce PODSourceLocation, NFCI

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D69903#2342011 , @miyuki wrote: > In D69903#2340020 , @dexonsmith > wrote: > >> An alternative would be to update the unions to an `AlignedCharArrayUnion` >> and use `SourceLocation`

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

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 27. dexonsmith added a comment. Add the unittest (`constructTwo`) that caught the off-by-one bug, somehow missed in the last update. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89913/new/ https://reviews.llvm.org/D89913 Files: clang/inc

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

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299989. dexonsmith added a comment. Herald added a subscriber: mgorny. Fix an off-by-one bug in `LineOffsetMapping::LineOffsetMapping`, add unit tests, and clang-format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89913/new/ https://reviews.ll

[PATCH] D89184: Support complex target features combinations

2020-10-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D89184#2346453 , @pengfei wrote: > LGTM. But I suggest you waiting for 1 or 2 days to see if other reviewers > object. Given that @echristo marked this as needing changes I would suggest waiting / reaching out to confirm t

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:1684 bool MyInvalid = false; ComputeLineNumbers(Diag, Content, ContentCacheAlloc, *this, MyInvalid); if (MyInvalid) dexonsmith wrote: > shafik wrote: > > Is the `const_

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299846. dexonsmith added a comment. Found a further simplification, removing a redundant call to `ContentCache::getBufferOrNone`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89922/new/ https://reviews.llvm.org/D89922 Files: clang/lib/Basic/

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: shafik. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Use `LineOffsetMapping:get` directly and remove/inline the helper `ComputeLineNumbers`, simplifying the callers. https://reviews.llvm.org/D899

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that this was in response to Shafik's comment in https://reviews.llvm.org/D89554. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89914/new/ https://reviews.llvm.org/D89914 ___ cfe-commits mailing list cfe-comm

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: shafik. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Avoid some noisy `const_cast`s by making `ContentCache::SourceLineCache` and `SourceManager::LastLineNoContentCache` both mutable. https://rev

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299811. dexonsmith added a comment. Renamed `getNumLines()` to `size()`, which is more natural given `begin()` and `end()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89913/new/ https://reviews.llvm.org/D89913 Files: clang/include/clang/Ba

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: shafik. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Put the guts of `ComputeLineNumbers` into `LineOffsetMapping::get` and `LineOffsetMapping::LineOffsetMapping`. As a drive-by, store the number

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

2020-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:1684 bool MyInvalid = false; ComputeLineNumbers(Diag, Content, ContentCacheAlloc, *this, MyInvalid); if (MyInvalid) shafik wrote: > Is the `const_cast` just for this li

[PATCH] D82699: [driver][arm64] Set target CPU to A12 for compiler invocations that target Apple Silicon

2020-10-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. Updated patch LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82699/new/ https://reviews.llvm.org/D82699 ___ cfe-commits maili

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. This should be complementary to https://reviews.llvm.org/D89580, but I think it's independent. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89749/new/ https://reviews.llvm.org/D89749 ___ cfe-commits mailing list

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