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

2020-11-30 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. When are you planning to refactor `OptInFFlag` to support the use cases called out in this patch? If it's right away / soon, I think it'd be a bit cleaner for to land the ref

[PATCH] D83940: [clang][cli] Port HeaderSearch option flags to new option parsing system

2020-11-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 with one nit. Comment at: clang/include/clang/Driver/Options.td:1514 + MarshallingInfoFlag<"HeaderSearchOpts->ModulesValidateDiagnosticOptions", "true">, IsNeg

[PATCH] D83892: [clang][cli] Port CodeGen option flags to new option parsing system

2020-12-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I think `DefaultsTo{True,False}` and `InvertedBy{Negative,Positive}Flag` makes the axes clear, it's way better; thanks for thinking this through. Thinking out loud: I'm still a bit resistant to making this keypath-centric. The reason is that `llvm::Option` is a libra

[PATCH] D91297: Frontend: Take VFS and MainFileBuffer by reference in PrecompiledPreamble::CanReuse, NFC

2020-12-01 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Frontend/PrecompiledPreamble.h:108 bool CanReuse(const CompilerInvocation &Invocation, -const llvm::MemoryBuffer *MainFileBuffer, PreambleBounds Bounds, -llvm::vfs::FileSystem *V

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

2020-12-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 rG32c501dd88b6: Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and… (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D90497?v

[PATCH] D92512: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: rnk. Herald added subscribers: ributzka, martong, hiraditya. Herald added a reviewer: shafik. Herald added projects: clang, LLVM. dexonsmith requested review of this revision. Update all the users of `AlignedCharArrayUnion` to stop pee

[PATCH] D92512: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Optionally, I could commit everything but the change to `AlignedCharArrayUnion` separately, just updating all the users to stop looking inside. If we think there's a chance of a revert that might be better... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D92512: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 309071. dexonsmith added a comment. Fix some build errors on the clang side of the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92512/new/ https://reviews.llvm.org/D92512 Files: clang/include/clang/AST/APValue.h clang/include/clang/A

[PATCH] D92512: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/AST/APValue.h:405 assert(isInt() && "Invalid accessor"); -return *(APSInt*)(char*)Data.buffer; +return *(APSInt *)(char *)&Data; } shafik wrote: > I notice that in `ASTTypeTraits.h`

[PATCH] D92516: ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: rnk, dblaikie. Herald added subscribers: ributzka, jfb, hiraditya. Herald added projects: clang, LLVM. dexonsmith requested review of this revision. Prepare to delete `AlignedCharArrayUnion` by migrating its users over to `std::aligned_

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

2020-12-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 rGdcc4f7f3c4b4: ARCMigrate: Stop abusing PreprocessorOptions for passing back file remappings… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE L

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

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:75-80 + // Copy and move constructors/assignments are no-ops as the RefCount isn't + // dictated by the class directly. RefCountedBase(const RefCountedBase &) {} + RefCountedBase(RefCou

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

2020-12-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 rG3b18a594c771: Frontend: Sink named pipe logic from CompilerInstance down to FileManager (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D92529: ASTImporter: Migrate to the FileEntryRef overload of SourceManager::createFileID, NFC

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: shafik, arphaman, jansvoboda11. Herald added subscribers: teemperor, ributzka, martong. Herald added a reviewer: a.sidorin. Herald added a project: clang. dexonsmith requested review of this revision. Migrate `ASTImporter::Import` over

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

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Hmm, I had to revert this in b34632201987eed369bb7ef4646f341b901c95b8 due to a bot failure; I'll need to look into it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

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

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, Bigcheese, jansvoboda11. Herald added subscribers: ributzka, JDevlieghere. Herald added a project: clang. dexonsmith requested review of this revision. This reverts commit b34632201987eed369bb7ef4646f341b901c95b8

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

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that the original commit was reviewed here: https://reviews.llvm.org/D90733. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92531/new/ https://reviews.llvm.org/D92531 ___

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

2020-12-02 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D90733#2429976 , @dexonsmith wrote: > Hmm, I had to revert this in b34632201987eed369bb7ef4646f341b901c95b8 > due to > a bot failure; I'll need to look i

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

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: llvm/include/llvm/ADT/IntrusiveRefCntPtr.h:75-76 RefCountedBase() = default; + // Copy and move constructors/assignments are no-ops as the RefCount isn't + // dictated by the class directly. RefCountedBase(const RefCountedBase

[PATCH] D92597: ARCMigrate: Initialize fields in EditEntry inline, NFC

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: jansvoboda11, JDevlieghere, akyrtzi. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Initialize the fields inline instead of having to manually write out a default constr

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

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG99b823c2eba3: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D90893: Support: Change InMemoryFileSystem::addFileNoOwn to take a MemoryBufferRef, NFC

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe763e032f8bb: Support: Change InMemoryFileSystem::addFileNoOwn to take a MemoryBufferRef, NFC (authored by dexonsmith). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository:

[PATCH] D92627: Basic: Add hashing support for FileEntryRef and DirectoryEntryRef

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Allow hashing FileEntryRef and DirectoryEntryRef via `hash_value`, and use that to i

[PATCH] D92630: ARCMigrate: Use hash_combine in the DenseMapInfo for EditEntry

2020-12-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, jansvoboda11, arphaman. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Simplify the DenseMapInfo for `EditEntry` by migrating from `FoldingSetNodeID` to `l

[PATCH] D92678: ARCMigrate: Migrate ObjCMT.cpp over to FileEntryRef

2020-12-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Migrate ObjCMT.cpp from using `const FileEntry*` to `FileEntryRef`. This is one of t

[PATCH] D92678: ARCMigrate: Migrate ObjCMT.cpp over to FileEntryRef

2020-12-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. The prep commits are: - https://reviews.llvm.org/D92627 (add hashing support for FileEntryRef) - https://reviews.llvm.org/D92630 (use hash_combine in DenseMapInfo EditEntry) - https://reviews.llvm.org/D92676 (hash_value for Optional) Repository: rG LLVM Github Mono

[PATCH] D92512: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC

2020-12-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 rG4b5dc150b986: ADT: Change AlignedCharArrayUnion to an alias of std::aligned_union_t, NFC (authored by dexonsmith). Changed prior to commit: https://reviews.llvm.org/D92512?vs=309071&id=309600#toc Repos

[PATCH] D92516: ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC

2020-12-04 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 rGd10f9863a5ac: ADT: Migrate users of AlignedCharArrayUnion to std::aligned_union_t, NFC (authored by dexonsmith). Repository: rG LLVM Github Monore

[PATCH] D92680: Frontend: Migrate to FileEntryRef in CompilerInstance::InitializeSourceManager, NFC

2020-12-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: jansvoboda11, JDevlieghere, arphaman. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Use `FileManager::getVirtualFileRef` to get the virtual file for stdin, and add an o

[PATCH] D92597: ARCMigrate: Initialize fields in EditEntry inline, NFC

2020-12-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 rG9ae0a46f2bbf: ARCMigrate: Initialize fields in EditEntry inline, NFC (authored by dexonsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92597/new/ http

[PATCH] D92529: ASTImporter: Migrate to the FileEntryRef overload of SourceManager::createFileID, NFC

2020-12-04 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 rGb4f4fc6872fb: ASTImporter: Migrate to the FileEntryRef overload of SourceManager… (authored by dexonsmith). Repository: rG LLVM Github Monorepo C

[PATCH] D92699: Frontend: Migrate to FileEntryRef in VerifyDiagnosticConsumer.cpp, NFC

2020-12-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Add a `FileEntryRef` overload of `SourceManager::translateFile`, and migrate `ParseD

[PATCH] D92773: [clang][cli] Unify boolean marshalling

2020-12-07 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! This is a nice cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92773/new/ https://reviews.llvm.org/D92773

[PATCH] D92774: [clang][cli] Add command line marshalling tests

2020-12-07 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 think the content here is mostly good, but there a number of things intermingled so it's hard see what's going on. I suggest splitting out one or more NFC commits to land a

[PATCH] D92775: [clang][cli] Add flexible TableGen multiclass for boolean options

2020-12-07 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. > Not 100% sure the benefits are worth the added complexity. I think this is worth it. Names seem pretty clear to me. All around, this seems a lot more clear to me than the approach you had in the CodeGenOptions patch. Comment at: clang/unittests/F

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

2020-10-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, Bigcheese. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. 4dc5573acc0d2e7c59d8bac2543eb25cb4b32984 added `FileEntryRef` in order to help enable sharing of a `FileManager` between `CompilerIn

[PATCH] D69840: [Basic] Make SourceLocation usable as key in hash maps, NFCI

2020-10-16 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. Herald added a subscriber: sstefan1. If you're still interested in pursuing this, I'm happy to review it. A general comment is that there are a couple of functional changes in

[PATCH] D58559: emit '(assertions enabled)' in the version string for a build of clang with assertions enabled

2020-10-16 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. Marking as "Request changes" to get this off my queue; are you still interested in pursuing this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2020-10-17 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith resigned from this revision. dexonsmith added a reviewer: Bigcheese. dexonsmith added a subscriber: Bigcheese. dexonsmith added a comment. Herald added a subscriber: dexonsmith. If this is still relevant, I’m happy for @ldionne and @Bigcheese to make the call. Repository: rC Clang

[PATCH] D24688: Introduce "hosted" module flag.

2020-10-17 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. Herald added subscribers: kerbowa, steven_wu, atanasyan, zzheng, MaskRay, fedor.sergeev, hiraditya, jvesely, sdardis, emaste. Herald added a reviewer: espindola. Herald added a

[PATCH] D89705: [clang] Use SourceLocation as key in std::map, NFCI

2020-10-19 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, assuming fix the linter problem by running `git show -U0 | clang-format-diff.py -i -p1` (or similar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D89430: clang/Basic: Remove SourceManager::getBufferPointer, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Thanks for the review! Comment at: clang/lib/Basic/SourceManager.cpp:167 Buffer.setInt(Buffer.getInt() | InvalidFlag); +return None; JDevlieghere wrote: > Orthogonal to this patch but an idea for a follow-up: this seems li

[PATCH] D89722: SourceManager: Simplify early returns in ContentCache::getBufferOrNone, NFC

2020-10-19 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. As suggested in the review for https://reviews.llvm.org/D89430, simplify the logic for marking the buffer as invalid in the early return p

[PATCH] D89430: clang/Basic: Remove SourceManager::getBufferPointer, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:167 Buffer.setInt(Buffer.getInt() | InvalidFlag); +return None; dexonsmith wrote: > JDevlieghere wrote: > > Orthogonal to this patch but an idea for a follow-up: this seems

[PATCH] D89406: clang/{Format,Rewrite}: Stop using SourceManager::getBuffer, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0ddf4bd47c18: clang/{Format,Rewrite}: Stop using SourceManager::getBuffer, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D89429: clang/Basic: Replace SourceManager::getMemoryBufferForFile, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Basic/SourceManager.cpp:121-127 llvm::Optional ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, SourceLocation Loc) const { if (auto *B = getBufferPointer(Diag, FM,

[PATCH] D89719: [clang][Basic] Make SourceLocation usable as key in hash maps, NFCI

2020-10-19 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. We don't usually add code without any current users. I suggest either adding a small unit test proving `SourceLocation` can now be used as a `DenseMap` key (probably preferre

[PATCH] D69840: [clang] Use SourceLocation as key in hash maps, NFCI

2020-10-19 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69840/new/ https://reviews.llvm.org/D69840 ___ cfe-commits mailing list cfe-co

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

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added a reviewer: dexonsmith. dexonsmith added inline comments. Comment at: clang/include/clang/Basic/SourceLocation.h:184-185 + /// Write this source location to a FoldingSetNodeID + void Profile(llvm::FoldingSetNodeI

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

2020-10-19 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. An alternative would be to update the unions to an `AlignedCharArrayUnion` and use `SourceLocation` directly. WDYT? Comment at: clang/include/clang/AST/Dec

[PATCH] D89398: Lexer: Update the Lexer to use MemoryBufferRef, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Lex/Lexer.h:145 /// outlive it, so it doesn't take ownership of either of them. - Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP); + Lexer(FileID FID, const llvm::MemoryBufferRef &Inpu

[PATCH] D22943: [Driver] Add FIXME's where we can't use effective triples (NFC)

2020-10-19 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. Herald added subscribers: pengfei, fedor.sergeev, kristof.beyls, krytarowski. Herald added a reviewer: JDevlieghere. I'm not sure if you're still interested in pursuing this, b

[PATCH] D31363: [libc++] Remove cmake glob for source files

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith resigned from this revision. dexonsmith added a reviewer: ldionne. dexonsmith added a comment. In D31363#889044 , @smeenai wrote: > @rjmccall, this adds a libc++ build dependency on LLVM's cmake modules. There > were some issues when @zturner ha

[PATCH] D89398: Lexer: Update the Lexer to use MemoryBufferRef, NFC

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Lex/Lexer.h:145 /// outlive it, so it doesn't take ownership of either of them. - Lexer(FileID FID, const llvm::MemoryBuffer *InputFile, Preprocessor &PP); + Lexer(FileID FID, const llvm::MemoryBufferRef &Inpu

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

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: teemperor. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Instead of putting a fake `SLocEntry` at `LoadedSLocEntryTable[Index]` when it fails to load in `SourceManager::loadSLocEntry`, allocate a fa

[PATCH] D89398: Lexer: Update the Lexer to use MemoryBufferRef, NFC

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

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

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: teemperor, Bigcheese. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Convert `SLocEntryLoaded` into an index vector into `LoadedSLocEntryTable`, where 0 indicates "not loaded", and change `LoadedSLocE

[PATCH] D89402: clang/Lex: Stop using SourceManager::getBuffer

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb03ae74319f1: clang/Lex: Stop using SourceManager::getBuffer (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

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

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299246. dexonsmith edited the summary of this revision. dexonsmith added a comment. Improved the naming of the helper types for `FileEntryRef` and the `SeenFileEntries` map and removed dead code for the old typedef. Found when working on a follow-up. CH

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

2020-10-19 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: teemperor, Bigcheese, arphaman, JDevlieghere. Herald added subscribers: llvm-commits, ributzka, mgorny. Herald added a project: LLVM. dexonsmith requested review of this revision. Split out llvm/Support/FileSystem/UniqueID.h and clang/B

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/FileEntry.h:33 + +using llvm::Optional; +using llvm::StringRef; JDevlieghere wrote: > Won't this now make `llvm::Optional` visible as `clang::Optional` everywhere > this header is included?

[PATCH] D89719: [clang][Basic] Make SourceLocation usable as key in hash maps, NFCI

2020-10-20 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/D89719/new/ https://reviews.llvm.org/D89719

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/FileEntry.h:33 + +using llvm::Optional; +using llvm::StringRef; dexonsmith wrote: > JDevlieghere wrote: > > Won't this now make `llvm::Optional` visible as `clang::Optional` > > everywhere t

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299365. dexonsmith added a comment. Use `#include ` to pull `StringRef` and `Optional` into `clang::`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89761/new/ https://reviews.llvm.org/D89761 Files: clang/include/clang/Basic/FileEntry.h cla

[PATCH] D89427: clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove SourceManager::getBuffer)

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG51d1d585e583: clang/Frontend: Use MemoryBufferRef in FrontendInputFile (and remove… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D89469: FileManager: Test FileManager::getFileRef

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG729d7d23282e: FileManager: Test FileManager::getFileRef (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D89469?vs=298379&id=299416#toc Reposit

[PATCH] D89469: FileManager: Test FileManager::getFileRef

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Herald added a subscriber: ormris. In D89469#2342117 , @arphaman wrote: > Thanks. Could you expand the comment in the test that this test path > specifically exercises the behavior produced by the RedirectingFileSystem? Yup, d

[PATCH] D67030: ContentCache: Simplify by always owning the MemoryBuffer

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping In D67030#2331280 , @dexonsmith wrote: > Rebased on top of https://reviews.llvm.org/D89431 (the tests haven't finished > yet; I'll update if necessary, but this is pretty straightforward). (FTR, the tests passed as expec

[PATCH] D89429: clang/Basic: Replace SourceManager::getMemoryBufferForFile, NFC

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2dc7e0c6a586: clang/Basic: Replace SourceManager::getMemoryBufferForFile, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D89430: clang/Basic: Remove SourceManager::getBufferPointer, NFC

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

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, arphaman, teemperor. Herald added subscribers: llvm-commits, ributzka, mgorny. Herald added a project: LLVM. dexonsmith requested review of this revision. Make a few changes to the `FileEntryRef` API in preparation for pro

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

2020-10-20 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. https://reviews.llvm.org/D89835 Files: clang/lib/Serialization/ModuleManager.cpp Index: clang/lib/Serialization/ModuleManager.cpp ===

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 299506. dexonsmith added a comment. Attaching the correct diff :/. 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 c

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

2020-10-20 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 `Module::ASTFile` and `ModuleFile::File` to use `MayeFileEntryRef` instead of `const FileEntry *`. One of many

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

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note that https://reviews.llvm.org/D89836 is an example of a follow-up patch that leverages these API changes. The original version of that patch was much, much noisier. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89834/new/ https://reviews.llvm.org/D8983

[PATCH] D89431: clang/Basic: ContentCache::InvalidFlag => ContentCache::IsBufferInvalid, NFC

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d78e2101ab7: clang/Basic: ContentCache::InvalidFlag => ContentCache::IsBufferInvalid, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D67030: ContentCache: Simplify by always owning the MemoryBuffer

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG296314516d10: ContentCache: Simplify by always owning the MemoryBuffer (authored by dexonsmith). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D67030?vs=298257&id=2995

[PATCH] D89722: SourceManager: Simplify early returns in ContentCache::getBufferOrNone, NFC

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4aa97e3dacf3: SourceManager: Simplify early returns in ContentCache::getBufferOrNone, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-10-20 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D85474#2343326 , @MaskRay wrote: > In D85474#2342365 , @compnerd wrote: > >> Is there a reason to not use the existing `-mlinker-version=` option and >> expanding that beyond just Dar

[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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

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