[PATCH] D11824: Make target feature 'arm' cover both 32 and 64 bit architecutres

2015-08-06 Thread Ben Langmuir via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: rsmith. benlangmuir added a subscriber: cfe-commits. benlangmuir set the repository for this revision to rL LLVM. Herald added subscribers: rengolin, aemerson. ... and add aarch32 to specifically refer to the 32-bit ones.

r244917 - Attempt to fix build after r244912

2015-08-13 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Aug 13 12:30:07 2015 New Revision: 244917 URL: http://llvm.org/viewvc/llvm-project?rev=244917view=rev Log: Attempt to fix build after r244912 Some compilers were less happy about converting a lambda to a comparator function for array_pod_sort. Modified:

Re: r244912 - [Modules] Add Darwin-specific compatibility module map parsing hacks

2015-08-13 Thread Ben Langmuir via cfe-commits
Yep, that should be it! On Aug 13, 2015, at 4:45 PM, Sean Silva chisophu...@gmail.com wrote: This was the last thing blocking http://reviews.llvm.org/D10423 http://reviews.llvm.org/D10423 on your side, right? -- Sean Silva On Thu, Aug 13, 2015 at 10:13 AM, Ben Langmuir via cfe-commits

r250963 - Fix use-after-free in ModuleManager

2015-10-21 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Oct 21 18:12:45 2015 New Revision: 250963 URL: http://llvm.org/viewvc/llvm-project?rev=250963=rev Log: Fix use-after-free in ModuleManager When removing out-of-date modules we might have left behind a VisitOrder that contains pointers to freed ModuleFiles. This was

Re: [PATCH] Allow "redefinition" of typedef of anon tag from unimported submodule

2015-11-13 Thread Ben Langmuir via cfe-commits
> On Nov 13, 2015, at 4:20 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > > On Fri, Nov 13, 2015 at 4:03 PM, Ben Langmuir via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: > This time sending to the right list addres

Re: [PATCH] Allow "redefinition" of typedef of anon tag from unimported submodule

2015-11-13 Thread Ben Langmuir via cfe-commits
> On Nov 13, 2015, at 5:32 PM, Ben Langmuir via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > >> On Nov 13, 2015, at 4:20 PM, Richard Smith <rich...@metafoo.co.uk >> <mailto:rich...@metafoo.co.uk>> wrote: >> >> On Fri, Nov 13,

r253123 - [modules] Allow "redefinition" of typedef of anon tag from unimported submodule

2015-11-13 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Nov 13 21:26:14 2015 New Revision: 253123 URL: http://llvm.org/viewvc/llvm-project?rev=253123=rev Log: [modules] Allow "redefinition" of typedef of anon tag from unimported submodule r233345 started being stricter about typedef names for linkage purposes in

[PATCH] Allow modules specified by -fmodule-map-file to shadow implicitly found ones

2015-11-18 Thread Ben Langmuir via cfe-commits
Hi Richard, This is an updated patch for allowing -fmodule-map-file to shadow implicitly found modules. I’ve tried to simplify things by just using the explicitness of the module rather than the original more-general approach. I’ll make a separate patch for -fmodule-file, which is turning

Re: r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2015-12-09 Thread Ben Langmuir via cfe-commits
Hey Richard, This caused a new error for the following code: @import Foo.X; // declaration of ‘struct foo’ from Foo.Y is not visible yet, but the pcm is loaded. struct foo *bar; // declares ‘struct foo’ @import Foo.Y; // also declares ‘struct foo’ void useFoo(struct foo *x);

Re: r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2015-12-09 Thread Ben Langmuir via cfe-commits
> On Dec 9, 2015, at 1:36 PM, Richard Smith <rich...@metafoo.co.uk> wrote: > > On Wed, Dec 9, 2015 at 11:55 AM, Ben Langmuir via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: > > On Dec 9, 2015, at 11:07 A

r255267 - [Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag

2015-12-10 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Dec 10 11:28:51 2015 New Revision: 255267 URL: http://llvm.org/viewvc/llvm-project?rev=255267=rev Log: [Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag This makes non-C++ languages find the same decl as C++ does to workaround a

r255377 - Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"

2015-12-11 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Dec 11 16:05:13 2015 New Revision: 255377 URL: http://llvm.org/viewvc/llvm-project?rev=255377=rev Log: Reapply "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag" Now not trying to use a C++ lookup mechanism in C (d'oh). Unqualified

r255312 - [VFS] Fix status() of opened redirected file

2015-12-10 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Dec 10 17:41:39 2015 New Revision: 255312 URL: http://llvm.org/viewvc/llvm-project?rev=255312=rev Log: [VFS] Fix status() of opened redirected file Make RedirectedFileSystem::openFilForRead(path)->status() the same as RedirectedFileSystem::status(path). Previously

r255324 - Revert "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag"

2015-12-10 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Dec 10 19:44:43 2015 New Revision: 255324 URL: http://llvm.org/viewvc/llvm-project?rev=255324=rev Log: Revert "[Modules] Fix regression when an elaborated-type-specifier mentions a hidden tag" This is causing assertion failures; reverting until I can fix. This

Re: r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2015-12-10 Thread Ben Langmuir via cfe-commits
oo.co.uk >> <mailto:rich...@metafoo.co.uk>> wrote: >> >> On Wed, Dec 9, 2015 at 11:55 AM, Ben Langmuir via cfe-commits >> <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>> wrote: >> > On Dec 9, 2015, at 11:07 AM, Be

Re: r252960 - [modules] Simplify and generalize the existing rule for finding hidden

2015-12-09 Thread Ben Langmuir via cfe-commits
> On Dec 9, 2015, at 11:07 AM, Ben Langmuir wrote: > > Hey Richard, > > This caused a new error for the following code: > >@import Foo.X; // declaration of ‘struct foo’ from Foo.Y is not visible > yet, but the pcm is loaded. >struct foo *bar; // declares ‘struct

Re: [PATCH] D20942: [LockFileManager] Improve error output by adding error messages

2016-06-02 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM. Some minor suggestions. Comment at: include/llvm/Support/LockFileManager.h:87 @@ +86,3 @@ + + /// \brief Get error message + std::string getErrorMessage()

Re: [PATCH] D21111: Avoid accessing an invalid PresumedLoc

2016-06-27 Thread Ben Langmuir via cfe-commits
benlangmuir added a subscriber: benlangmuir. benlangmuir added a comment. LGTM Repository: rL LLVM http://reviews.llvm.org/D2 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-10 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. Please clarify what you mean here: > The rationale is that if source and destination paths in the YAML file > contain ".." this is enough > for the file manager to retrieve the right file, meaning that it doesn't > matter how we write it > since the FileManager

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-12 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > Given the two-path solution, another thing we could do in the first path, is > to default to the remove_dots() version for the source, i.e. > "/install-dir/lib/clang/3.8.0/include" instead of > "/install-dir/bin/../lib/clang/3.8.0/include". The path after

Re: r252114 - [modules] If we're given a module file, via -fmodule-file=, for a module, but

2016-02-11 Thread Ben Langmuir via cfe-commits
FYI I changed this to early-exit again in r260563 to fix implicit builds. It’s not safe to keep reading if we haven’t told ReadOptionsBlock to expect failures, since it will itself early-exit, leaving the stream in the middle of a block. It’s also a performance advantage to early exit when

r260563 - [Modules] Early-exit if ReadOptionsBlock fails to avoid crashing

2016-02-11 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Feb 11 12:54:02 2016 New Revision: 260563 URL: http://llvm.org/viewvc/llvm-project?rev=260563=rev Log: [Modules] Early-exit if ReadOptionsBlock fails to avoid crashing If we didn't tell ReadOptionsBlock to allow failures then we can't assume that the stream is not

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-11 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > Now, we try to use the new YAML file + cache from a new clang invocation. > When the FileManager requests status in (2) for the path > "/install-dir/bin/../lib/clang/3.8.0/include/altivec.h" neither > "remove_dots()" nor "realpath()" would be able to resolve it

r259734 - Fix predefine for __NSConstantString struct type

2016-02-03 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Feb 3 18:55:24 2016 New Revision: 259734 URL: http://llvm.org/viewvc/llvm-project?rev=259734=rev Log: Fix predefine for __NSConstantString struct type Per review feedback the name was wrong and it can be used outside Objective-C. Unfortunately, making the internal

Re: r259624 - Make CF constant string decl visible to name lookup to fix module errors

2016-02-03 Thread Ben Langmuir via cfe-commits
Hey Doug, I fixed this in r259734; could you take a glance at that patch too? As I mentioned in person it required more changes than just moving this definition outside the if/fixing the name. Thanks, Ben > On Feb 3, 2016, at 11:50 AM, Ben Langmuir via cfe-commits > <cf

Re: r259624 - Make CF constant string decl visible to name lookup to fix module errors

2016-02-03 Thread Ben Langmuir via cfe-commits
> On Feb 3, 2016, at 11:45 AM, Douglas Gregor <dgre...@apple.com> wrote: > >> >> On Feb 2, 2016, at 7:26 PM, Ben Langmuir via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> >> Author: benlangmuir >> Date: Tue Feb 2 21:26:19 20

r259624 - Make CF constant string decl visible to name lookup to fix module errors

2016-02-02 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Tue Feb 2 21:26:19 2016 New Revision: 259624 URL: http://llvm.org/viewvc/llvm-project?rev=259624=rev Log: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a

r261887 - Add FieldNames to __NSConstantString_tag

2016-02-25 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Feb 25 10:36:26 2016 New Revision: 261887 URL: http://llvm.org/viewvc/llvm-project?rev=261887=rev Log: Add FieldNames to __NSConstantString_tag Since consumers of the AST may expect fields to be named. Patch by Brad King! Modified:

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-15 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. Okay, let's go with the two-path solution. Thanks! http://reviews.llvm.org/D17104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-19 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM if you fix 256->PATH_MAX. Comment at: lib/Frontend/ModuleDependencyCollector.cpp:66 @@ +65,3 @@ +#ifdef HAVE_REALPATH + char CanonicalPath[256]; +

Re: [PATCH] D17457: [VFS] Add 'overlay-relative' field to YAML files

2016-02-19 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM! http://reviews.llvm.org/D17457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: r260543 - [Modules] Don't infinite recurse on implicit import of circular modules in preamble

2016-02-11 Thread Ben Langmuir via cfe-commits
016, at 9:04 AM, Ben Langmuir via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > Author: benlangmuir > Date: Thu Feb 11 11:04:42 2016 > New Revision: 260543 > > URL: http://llvm.org/viewvc/llvm-project?rev=260543=rev > Log: > [Modules] Don't infinite rec

r260543 - [Modules] Don't infinite recurse on implicit import of circular modules in preamble

2016-02-11 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Feb 11 11:04:42 2016 New Revision: 260543 URL: http://llvm.org/viewvc/llvm-project?rev=260543=rev Log: [Modules] Don't infinite recurse on implicit import of circular modules in preamble Update the Preprocessor's VisibleModuleSet when typo-correction creates an

Re: [PATCH] D17104: [VFS] Drop path traversal assertion

2016-02-10 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. I don't think this is the right approach. If we don't canonicalize the source path then: - looking up the path *without* the .. won't work, which means anything that looks up a realpath will fail - directory iteration won't combine entries from foo/bar/.. and foo/

Re: r262984 - [index] Fix assertion hit when indexing re-declarations of built-in functions.

2016-03-08 Thread Ben Langmuir via cfe-commits
> On Mar 8, 2016, at 6:12 PM, Argyrios Kyrtzidis via cfe-commits > wrote: > > Author: akirtzidis > Date: Tue Mar 8 20:12:40 2016 > New Revision: 262984 > > URL: http://llvm.org/viewvc/llvm-project?rev=262984=rev > Log: > [index] Fix assertion hit when indexing

r263076 - [Modules] Add stdatomic to the list of builtin headers

2016-03-09 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Mar 9 17:31:34 2016 New Revision: 263076 URL: http://llvm.org/viewvc/llvm-project?rev=263076=rev Log: [Modules] Add stdatomic to the list of builtin headers Since it's provided by the compiler. This allows a system module map file to declare a module for it. No

Re: [PATCH] D18585: [CrashReproducer] Add a module map callback for added headers

2016-03-30 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D18585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > From what I understand from > http://lists.llvm.org/pipermail/cfe-dev/2014-July/038273.html, changing the > behavior of the cached result has side-effects and demands a non trivial > change, am I assuming the right thing? Yes. Threading through the Filename

Re: r259734 - Fix predefine for __NSConstantString struct type

2016-04-11 Thread Ben Langmuir via cfe-commits
, if possible. There is a if (getLangOpts().ObjC1) block just before this. >> >> 2016-04-03 14:21 GMT+03:00 Vassil Vassilev via cfe-commits >> <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>>: >> On 04/02/16 01:55, Ben Langmuir via cfe-commits wr

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added inline comments. Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested path. This is not true when

Re: r259734 - Fix predefine for __NSConstantString struct type

2016-04-11 Thread Ben Langmuir via cfe-commits
“weird” to see it in the AST? >> >>> On Apr 3, 2016, at 5:21 AM, Yaron Keren <yaron.ke...@gmail.com >>> <mailto:yaron.ke...@gmail.com>> wrote: >>> >>> +1, if possible. There is a if (getLangOpts().ObjC1) block just before this. >>>

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-11 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. This doesn't appear to be a safe change. We can't assume that `RootName` wouldn't ever be legitimately found somewhere in a path (even without a VFS) and changing the path prefix could give a completely different location. I would also be concerned about the

r264423 - [index] Remove redundancy between symbol kind and language

2016-03-25 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Mar 25 12:01:59 2016 New Revision: 264423 URL: http://llvm.org/viewvc/llvm-project?rev=264423=rev Log: [index] Remove redundancy between symbol kind and language Condense the ObjCKIND and CXXKIND options into just KIND, since the language was already specified on a

Re: [PATCH] D17299: [ASTReader] Report error when accessing corrupt record data

2016-03-02 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. This LGTM, but I would like Richard to take a look too. http://reviews.llvm.org/D17299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r259734 - Fix predefine for __NSConstantString struct type

2016-04-03 Thread Ben Langmuir via cfe-commits
+1, if possible. There is a if (getLangOpts().ObjC1) block just before this. > > 2016-04-03 14:21 GMT+03:00 Vassil Vassilev via cfe-commits > <cfe-commits@lists.llvm.org <mailto:cfe-commits@lists.llvm.org>>: > On 04/02/16 01:55, Ben Langmuir via cfe-commits wrote: > Author: benlangmuir >

Re: [PATCH] D20383: PCH + Module: make sure we write out macros associated with builtin identifiers

2016-05-23 Thread Ben Langmuir via cfe-commits
benlangmuir added a subscriber: doug.gregor. benlangmuir added a comment. I'd like to see Doug and/or Richard review this. It seems reasonable to me to first blush, but I assume there was a good reason we weren't doing this already... http://reviews.llvm.org/D20383

Re: [PATCH] D20266: [Modules] Use vfs for (recursive) directory iteration

2016-05-16 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D20266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D20194: [ModuleMap][CrashReproducer] Collect headers from inner frameworks

2016-05-13 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. Let's move the code looks up the alternate name out of the ModuleMap parser, and into the dependency collector callbacks. This feels like an implementation detail of the dependency collector. We could add a new callback specifically for umbrella headers and

r268471 - Fix CodeCompletion & TypoCorrection when combining a PCH with Modules

2016-05-03 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Tue May 3 19:53:13 2016 New Revision: 268471 URL: http://llvm.org/viewvc/llvm-project?rev=268471=rev Log: Fix CodeCompletion & TypoCorrection when combining a PCH with Modules This commit fixes the IdentifierIterator to actually include identifiers from a PCH or

Re: [PATCH] D17820: Clang Code Completion Filtering

2016-05-05 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. LGTM with one comment about the doxygen comments, but you should probably wait to hear from @akyrtzi too. Comment at: include/clang/Sema/CodeCompleteConsumer.h:916 @@ +915,3 @@ + /// \name Code-completion filtering + //@{ + /// \brief Check if

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. We need to add this option to the module hash (see getModuleHash - we already add a bunch of other HSOpts there). Otherwise the pcm could still be rewritten by a compilation that doesn't use a PCH, and then it would be out of date because of the timestamp instead

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-25 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > the pcm could still be rewritten by a compilation that doesn't use a PCH, and > then it would be out of date because of the timestamp instead of the > diagnostic options > > "a compilation that doesn't use a PCH", is that a different project? And we > have two

r275454 - [index] Index system ImportDecls even when there is a DeclarationsOnly filter

2016-07-14 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Jul 14 13:51:55 2016 New Revision: 275454 URL: http://llvm.org/viewvc/llvm-project?rev=275454=rev Log: [index] Index system ImportDecls even when there is a DeclarationsOnly filter Whether we call an ImportDecl a decl or a reference symbol role is somewhat academic,

r275464 - Attempt to workaround Windows bots after my previous commit

2016-07-14 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Jul 14 15:08:43 2016 New Revision: 275464 URL: http://llvm.org/viewvc/llvm-project?rev=275464=rev Log: Attempt to workaround Windows bots after my previous commit For some reason it seems the second invocation is getting DMOD_OTHER_H set to a path

r275496 - Remove the new module cache from the index-module test

2016-07-14 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Thu Jul 14 17:53:23 2016 New Revision: 275496 URL: http://llvm.org/viewvc/llvm-project?rev=275496=rev Log: Remove the new module cache from the index-module test Forgot to add the new cache to the `rm -rf` line. This broke some bots when trying to load a module built

Re: r275464 - Attempt to workaround Windows bots after my previous commit

2016-07-14 Thread Ben Langmuir via cfe-commits
tizer-x86_64-linux-fast/builds/14659/steps/check-clang%20msan/logs/stdio > > <http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/14659/steps/check-clang%20msan/logs/stdio> > On Thu, Jul 14, 2016 at 1:16 PM Ben Langmuir via cfe-commits > <cfe-com

Re: [PATCH] D22636: Module: retry building modules that were just compiled by the same instance and are are out of date

2016-07-21 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > B.pcm becomes out of date when we try to load module "A", because another > instance overwrites "B.pcm" How can this happen? We intentionally keep the file descriptors of modules open. If you just built A, then you will have B.pcm still open. When you read

Re: [PATCH] D22636: Module: retry building modules that were just compiled by the same instance and are are out of date

2016-07-22 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > Can you point me to the source codes where we use rename to replace the file? > I am curious on how this all works out. This is the same as clang's handling of other output files. See {{CompilerInstance::createOutputFile}} and {{clearOutputFiles}}. When we are

Re: [PATCH] D22773: Modules: add command line option fmodules-disable-diagnostic-validation to disable validation of the diagnostic options when loading the module

2016-07-26 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D22773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D23422: [VFS] Add 'ignore-non-existent-contents' field to YAML

2016-08-11 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. This should have a test for the writer change. Otherwise LGTM. https://reviews.llvm.org/D23422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-09 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. Still missing the change for `if (IsPrebuilt) {`, but otherwise LGTM. https://reviews.llvm.org/D23125 ___ cfe-commits mailing list

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-03 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. How about -fmodules-use-prebuilt-**module-cache** for the flag name? Saying "prebuilt-modules" is confusing to me, since -fmodule-file can also be used to load a prebuilt module, but doesn't use a cache. Comment at: lib/Driver/Tools.cpp:5416 @@

Re: r202329 - Add a 'use-external-names' option to VFS overlay files

2016-07-20 Thread Ben Langmuir via cfe-commits
> On Jul 18, 2016, at 3:21 PM, Richard Smith wrote: > > On Wed, Feb 26, 2014 at 4:25 PM, Ben Langmuir > wrote: > Author: benlangmuir > Date: Wed Feb 26 18:25:12 2014 > New Revision: 202329 > > URL:

Re: r275600 - [objcmt] Fix a buffer overflow crash than can occur while modernizing enums.

2016-07-15 Thread Ben Langmuir via cfe-commits
> On Jul 15, 2016, at 12:22 PM, Argyrios Kyrtzidis via cfe-commits > wrote: > > Author: akirtzidis > Date: Fri Jul 15 14:22:34 2016 > New Revision: 275600 > > URL: http://llvm.org/viewvc/llvm-project?rev=275600=rev > Log: > [objcmt] Fix a buffer overflow crash than

Re: [PATCH] D23125: Modules: add command line option to support loading prebuilt modules on demand, without parsing any module map

2016-08-09 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. Sorry for the delay, I apparently forgot to hit submit. Replied inline. Comment at: lib/Frontend/CompilerInstance.cpp:1491 @@ +1490,3 @@ +false/*IsExplicit*/).first; +Module->IsSystem = true; +Module->IsFromModuleFile =

Re: [PATCH] D23858: Don't diagnose non-modular includes when we are not compiling a module

2016-08-25 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. LGTM, but @rsmith should glance at this too. https://reviews.llvm.org/D23858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25948: [VFS] Replace TimeValue usage with std::chrono

2016-11-08 Thread Ben Langmuir via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM, sorry for the delay. https://reviews.llvm.org/D25948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-11-15 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. I'm inclined to suggest we break that behaviour with modules and treat a user module the same no matter where it was imported. @rsmith, what do you think? https://reviews.llvm.org/D25916 ___ cfe-commits mailing list

[PATCH] D25916: Modules: emit an error instead of a random crash (or a misleading error) due to use-after-free.

2016-11-14 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > Does it mean that a system module should only import system modules? If a > system module is allowed to import non-system modules, for a non-system > module, we will validate diagnostic options differently depending on whether > a system module or a non-system

r308800 - [index] Set SymbolSubKind::Accessor[GS]etter on class methods

2017-07-21 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Jul 21 16:04:27 2017 New Revision: 308800 URL: http://llvm.org/viewvc/llvm-project?rev=308800=rev Log: [index] Set SymbolSubKind::Accessor[GS]etter on class methods We have the same relation between class properties and getter/setters that we have for instance

r307855 - [index] Don't add relation to a NamedDecl with no name

2017-07-12 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Wed Jul 12 15:05:30 2017 New Revision: 307855 URL: http://llvm.org/viewvc/llvm-project?rev=307855=rev Log: [index] Don't add relation to a NamedDecl with no name Unless it's one of the special cases (tag, category) that we can handle. This syncs up the check between

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

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

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

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

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

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

r328337 - [vfs] Don't bail out after a missing -ivfsoverlay file

2018-03-23 Thread Ben Langmuir via cfe-commits
Author: benlangmuir Date: Fri Mar 23 10:37:27 2018 New Revision: 328337 URL: http://llvm.org/viewvc/llvm-project?rev=328337=rev Log: [vfs] Don't bail out after a missing -ivfsoverlay file This make -ivfsoverlay behave more like other fatal errors (e.g. missing -include file) by skipping the

Re: [clang] dd870f6 - Fix warning about unused std::unique result, erase shifted elements

2019-11-18 Thread Ben Langmuir via cfe-commits
Nice find. The change LGTM, and is clearly what I always intended it to do. I was confused how this ever worked at all, but I see that (at least in libc++) we move the values into place rather than swap them, so the values at the end are still the largest values for types with a trivial move

[clang] 2ac0c4b - [DirectoryWatcher] Fix misuse of FSEvents API and data race

2020-02-11 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2020-02-11T09:25:38-08:00 New Revision: 2ac0c4b46ee2a3c22b85b4483f2fd4d0fb916720 URL: https://github.com/llvm/llvm-project/commit/2ac0c4b46ee2a3c22b85b4483f2fd4d0fb916720 DIFF: https://github.com/llvm/llvm-project/commit/2ac0c4b46ee2a3c22b85b4483f2fd4d0fb916720.diff

[clang] cc3fddb - [pch] Honour -fallow-pch-with-compiler-errors for overall compilation status

2020-03-31 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2020-03-31T13:50:12-07:00 New Revision: cc3fddb411d55d4d0902a772a9f3db11fc4f002e URL: https://github.com/llvm/llvm-project/commit/cc3fddb411d55d4d0902a772a9f3db11fc4f002e DIFF: https://github.com/llvm/llvm-project/commit/cc3fddb411d55d4d0902a772a9f3db11fc4f002e.diff

[clang] c322d32 - Forward WrapperFrontendAction::shouldEraseOutputFiles()

2020-03-31 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2020-03-31T16:20:23-07:00 New Revision: c322d328aa331639f647711aee44c5dddfadd337 URL: https://github.com/llvm/llvm-project/commit/c322d328aa331639f647711aee44c5dddfadd337 DIFF: https://github.com/llvm/llvm-project/commit/c322d328aa331639f647711aee44c5dddfadd337.diff

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

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

[clang] 93c87fc - [index] Improve macro indexing support

2021-04-06 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2021-04-06T09:12:14-07:00 New Revision: 93c87fc06eca8d8a65ff6c0bdd9f2671227224ac URL: https://github.com/llvm/llvm-project/commit/93c87fc06eca8d8a65ff6c0bdd9f2671227224ac DIFF: https://github.com/llvm/llvm-project/commit/93c87fc06eca8d8a65ff6c0bdd9f2671227224ac.diff

[clang] b8da594 - Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2021-10-21T09:00:18-07:00 New Revision: b8da594750762f811283820c19b02cedfb6632d4 URL: https://github.com/llvm/llvm-project/commit/b8da594750762f811283820c19b02cedfb6632d4 DIFF: https://github.com/llvm/llvm-project/commit/b8da594750762f811283820c19b02cedfb6632d4.diff

[clang] 0e5ea40 - Fix running orc-rt tests with LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-01-25 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2022-01-25T08:27:40-08:00 New Revision: 0e5ea403e8deeb5374a9072aaa12292b9c0bed30 URL: https://github.com/llvm/llvm-project/commit/0e5ea403e8deeb5374a9072aaa12292b9c0bed30 DIFF: https://github.com/llvm/llvm-project/commit/0e5ea403e8deeb5374a9072aaa12292b9c0bed30.diff

[clang] [clang][deps] Optimize command line generation (PR #65412)

2023-09-05 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: > There are places in Clang where we store the result of the const function in > some kind of long-lived data structure, and someplace else modify the result > of the non-const function, expecting the change to be reflected. I would be comfortable with this, because you

[clang] [clang][deps] Optimize command line generation (PR #65412)

2023-09-05 Thread Ben Langmuir via cfe-commits
benlangmuir wrote: I haven't dug into this in depth yet, but did you consider keeping the normal function names for the `const` versions and only rename the mutating ones? My thinking is you could use `CowCompilerInvocation` as a drop-in replacement for `CompilerInvocation` in immutable

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); benlangmuir wrote: Is the idea

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); benlangmuir wrote: > The

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang] [clang][deps] Load module map file from PCM (PR #66389)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -1307,6 +1307,9 @@ void ModuleMap::setInferredModuleAllowedBy(Module *M, std::error_code ModuleMap::canonicalizeModuleMapPath(SmallVectorImpl ) { + FileManager = SourceMgr.getFileManager(); + FM.makeAbsolutePath(Path); benlangmuir wrote: > This

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-15 Thread Ben Langmuir via cfe-commits
@@ -330,3 +353,20 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine ) { return Result.getError(); return DepScanFile::create(Result.get()); } + +std::error_code DependencyScanningWorkerFilesystem::setCurrentWorkingDirectory( +const Twine ) { +

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-12 Thread Ben Langmuir via cfe-commits
@@ -215,44 +225,57 @@ DependencyScanningWorkerFilesystem::findEntryByFilenameWithWriteThrough( } llvm::ErrorOr -DependencyScanningWorkerFilesystem::computeAndStoreResult(StringRef Filename) { - llvm::ErrorOr Stat = getUnderlyingFS().status(Filename);

[clang] [DependencyScanningFilesystem] Make sure the local/shared cache filename lookups use only absolute paths (PR #66122)

2023-09-12 Thread Ben Langmuir via cfe-commits
@@ -215,44 +225,57 @@ DependencyScanningWorkerFilesystem::findEntryByFilenameWithWriteThrough( } llvm::ErrorOr -DependencyScanningWorkerFilesystem::computeAndStoreResult(StringRef Filename) { - llvm::ErrorOr Stat = getUnderlyingFS().status(Filename);

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -66,16 +66,18 @@ bool ParseDiagnosticArgs(DiagnosticOptions , llvm::opt::ArgList , DiagnosticsEngine *Diags = nullptr, bool DefaultDiagColor = true); +namespace CompilerInvocationDetail { /// The base class of

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -94,47 +96,37 @@ class CompilerInvocationRefBase { /// Options controlling the static analyzer. AnalyzerOptionsRef AnalyzerOpts; - CompilerInvocationRefBase(); - CompilerInvocationRefBase(const CompilerInvocationRefBase ); -

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -154,46 +146,158 @@ class CompilerInvocationValueBase { PreprocessorOutputOptions PreprocessorOutputOpts; public: - MigratorOptions () { return MigratorOpts; } + // clang-format off const MigratorOptions () const { return MigratorOpts; } - - CodeGenOptions () {

[clang] [clang] Introduce copy-on-write `CompilerInvocation` (PR #65412)

2023-09-07 Thread Ben Langmuir via cfe-commits
@@ -123,49 +123,101 @@ static Expected> parseToleranceOption(StringRef Arg) { } //===--===// -// Initialization. +// Storage details.

  1   2   3   4   >