[clang] 260fb2b - [clang][modules] Don't hard code [no_undeclared_includes] for the Darwin module

2022-08-30 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2022-08-30T14:57:15-07:00 New Revision: 260fb2bc3f79019cae4e182a64c8752d3d25049e URL: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e DIFF: https://github.com/llvm/llvm-project/commit/260fb2bc3f79019cae4e182a64c8752d3d25049e.diff

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-06 Thread Ian Anderson via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang -### --target=arm64-apple-darwin %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-OPTION + +// RUN: %clang -dM -E --target=arm64-apple-macos %s 2>&1 \ +// RUN: | FileCheck %s -DMAC=1 \ +// RUN:-DOSX=1 \ +// RUN:

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-06 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/74676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PP] Add extension to predefine target OS macros (PR #74676)

2023-12-07 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/74676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fix] Disable fdefine-target-os-macros for now (PR #74886)

2023-12-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/74886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove the builtin_headers_in_system_modules feature (PR #75262)

2023-12-12 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/75262 __has_feature(builtin_headers_in_system_modules) was added in https://reviews.llvm.org/D159483 to be used in the stdarg/stddef implementation headers. It ended up being unnecessary, but I forgot to rem

[clang] Remove the builtin_headers_in_system_modules feature (PR #75262)

2023-12-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/75262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

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

2024-03-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/86748 Even if __need_unreachable is set, stddef.h should not declare unreachable() in C++ because it conflicts with the declaration in . >From bfa16401ee26425492ce52daabe4144ea70da973 Mon Sep 17 00:00:00 200

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/86748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-26 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/86748 >From e67c757c7cdd1837008e573295e87e3ebec5382d Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 26 Mar 2024 16:19:38 -0700 Subject: [PATCH] [Headers] Don't declare unreachable() from stddef.h in C

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-26 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > I'm checking with the C and C++ Compatibility study group (SG22) for what's > expected here. Prior to adding `__need_unreachable` in LLVM 18, clang would never declare `unreachable()` in C++ mode, but would defer to the C++ library to do that. I think we should keep

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-27 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > (for example, we now include `string.h` and `stdbit.h` in freestanding, both > of which provide a lot of function interfaces) We do? I don't see those in lib/Headers https://github.com/llvm/llvm-project/pull/86748 ___ cfe-c

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-28 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > I still don't understand how that works in case you do end up including a > header from the platform that (re)defines `unreachable`, for example. > > The same problem also applies today to e.g. `size_t` and anything else > provided by the Clang builtin headers. If a

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: @ldionne @AaronBallman is there anything I need to do before merging this? https://github.com/llvm/llvm-project/pull/86748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-03-29 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: I do wonder if we could have the broader builtin headers discussion independent of this patch? Is everyone happy with this patch? We can keep talking about the builtin headers in here independent of merging right? https://github.com/llvm/llvm-project/pull/86748 ___

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-01 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > FWIW, I did verify that it's very unlikely the changes in this PR will break > existing code: > https://sourcegraph.com/search?q=context:global+__need_unreachable+-file:.*clang.*&patternType=keyword&sm=0, > so that's a good thing. > > > I do wonder if we could have

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-02 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > > FWIW, I did verify that it's very unlikely the changes in this PR will > > > break existing code: > > > https://sourcegraph.com/search?q=context:global+__need_unreachable+-file:.*clang.*&patternType=keyword&sm=0, > > > so that's a good thing. > > > > I do wonder

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

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/84127 On Apple platforms, some of the stddef.h types are also declared in system headers. In particular NULL has a conflicting declaration in . When that's in a different module from <__stddef_null.h>, rede

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

2024-03-05 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: We should consider this for LLVM 18, it's a regression from https://reviews.llvm.org/D159064 https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

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

2024-03-05 Thread Ian Anderson via cfe-commits
@@ -7,7 +7,7 @@ *===---=== */ -#if !defined(NULL) || !__has_feature(modules) +#if !defined(NULL) || !__building_module(_Builtin_stddef) ian-twilightcoder wrote: ``` #if !defined(NULL) || !_

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

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/84127 >From e34ccad2b82b75c050d12bbb987529c320c0df9d Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 5 Mar 2024 22:56:36 -0800 Subject: [PATCH] [clang][modules] giving the __stddef_ headers their own

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

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-06 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Still need to check the code but > > > Make the __stddef_ headers be non-modular in > > -fbuiltin-headers-in-system-modules and restore them back to not respecting > > their header guards. Still define the header guards though. > > sounds quite questionable. They w

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-11 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/83660 >From 1cb3d459f3a9ae73ac98bf8c06b905d788be954f Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 1 Mar 2024 22:17:09 -0800 Subject: [PATCH] [clang][modules] Headers meant to be included multiple ti

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-11 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > To clarify a little bit > > > [...] The "already included" state is global across all modules (which is > > necessary so that non-modular headers don't get compiled into multiple > > translation units and cause redeclaration errors). > > The necessity isn't actually

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

2024-03-11 Thread Ian Anderson via cfe-commits
@@ -2498,9 +2498,12 @@ void ModuleMapParser::parseHeaderDecl(MMToken::TokenKind LeadingToken, } bool NeedsFramework = false; - // Don't add the top level headers to the builtin modules if the builtin headers - // belong to the system modules. - if (!Map.LangOpts.Built

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

2024-03-11 Thread Ian Anderson via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

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

2024-03-11 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/84127 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-03-12 Thread Ian Anderson via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > Sometimes it does confuse clang, at least I saw problems with a `typedef > > enum` when I made an include-once header `textual`. > > Ok, I see. I would just consider it a bug, not a design decision. > > > That's correct. `#import` is an external source - often it c

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

2024-03-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > I'm not excited by the complexity we are moving toward with the builtin > headers. But I don't have any alternatives. > > Given the situation we are in, I think the change is ok. But I'd like someone > else to look at it as it is tricky to reason about it. No blocker

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-01 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/83660 Once a file has been `#import`'ed, it gets stamped as if it was `#pragma once` and will not be re-entered, even on #include. This means that any errant #import of a file designed to be included multipl

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-01 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Thanks to @Bigcheese for helping with this patch. https://reviews.llvm.org/D26267 looks like the most recent significant update to this code that we could find. It had an additional allowance where clang headers that were _not_ marked `textual` could be re-entered. I t

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-01 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/83660 >From 771c0740dcc438d99baf4ad9555bc57e963001df Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 1 Mar 2024 22:17:09 -0800 Subject: [PATCH] [clang][modules] Headers meant to be included multiple ti

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-02 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: ``` error: 'expected-error' diagnostics seen but not expected: File /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-6mhbj-1/llvm-project/clang-ci/clang/test/Modules/explicit-build-overlap.cpp Line 11: module use does not directly depend on a module exporting 'a.h',

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > Once a file has been `#import`'ed, it gets stamped as if it was `#pragma > > once` and will not be re-entered, even on #include. > > Can you explain how this is happening? The only place where > `HeaderFileInfo::isPragmaOnce` is set to `true` is in > `HeaderSearch

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/83660 >From 08681ff77f432806316109146ab4fef058137648 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 1 Mar 2024 22:17:09 -0800 Subject: [PATCH] [clang][modules] Headers meant to be included multiple ti

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/83660 >From f90fe8b1b7c73b68614ade3cf7e1c292f02d3573 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 1 Mar 2024 22:17:09 -0800 Subject: [PATCH] [clang][modules] Headers meant to be included multiple ti

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-03-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > Thanks to @Bigcheese for helping with this patch. > > https://reviews.llvm.org/D26267 looks like the most recent significant update > to this code that we could find. It had an additional allowance where clang > headers that were _not_ marked `textual` could be re-en

[clang] [Docs] Add release note about Clang-defined target OS macros (PR #79879)

2024-01-29 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder approved this pull request. https://github.com/llvm/llvm-project/pull/79879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] textual headers in submodules never resolve their `use`s (PR #69651)

2023-10-19 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/69651 When an include from a textual header is resolved, the textual header's submodule is used as the requesting module. The submodule's uses are resolved, but that doesn't work because only top level modul

[clang] [Modules] textual headers in submodules never resolve their `use`s (PR #69651)

2023-10-19 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Somewhat indirectly caused by https://reviews.llvm.org/D132779 https://github.com/llvm/llvm-project/pull/69651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] textual headers in submodules never resolve their `use`s (PR #69651)

2023-10-19 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/69651 >From 7b88bf3102240d1734feab8919a049f8a92ca0e0 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Thu, 19 Oct 2023 15:22:11 -0700 Subject: [PATCH] [Modules] textual headers in submodules never resolve th

[clang] [Modules] textual headers in submodules never resolve their `use`s (PR #69651)

2023-10-20 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/69651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 6408e6c - [libunwind] Add module maps for libunwind

2022-10-26 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2022-10-26T22:39:46-07:00 New Revision: 6408e6c99d42af3bf866f92931d1f17d97bb7d37 URL: https://github.com/llvm/llvm-project/commit/6408e6c99d42af3bf866f92931d1f17d97bb7d37 DIFF: https://github.com/llvm/llvm-project/commit/6408e6c99d42af3bf866f92931d1f17d97bb7d37.diff

[clang] 0ea3d88 - [Modules] Add a flag to control builtin headers being in system modules

2023-09-28 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-09-28T11:30:09-07:00 New Revision: 0ea3d88bdb16aa6e9a0043cc3ed93dcb88a89dea URL: https://github.com/llvm/llvm-project/commit/0ea3d88bdb16aa6e9a0043cc3ed93dcb88a89dea DIFF: https://github.com/llvm/llvm-project/commit/0ea3d88bdb16aa6e9a0043cc3ed93dcb88a89dea.diff

[clang] 9a7a6dd - [Modules] Make clang modules for the C standard library headers

2023-10-03 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-10-03T12:41:11-07:00 New Revision: 9a7a6dd3c358ca7becef75c0a9581dcfa3e6b5f4 URL: https://github.com/llvm/llvm-project/commit/9a7a6dd3c358ca7becef75c0a9581dcfa3e6b5f4 DIFF: https://github.com/llvm/llvm-project/commit/9a7a6dd3c358ca7becef75c0a9581dcfa3e6b5f4.diff

[clang] Fix the Modules/compiler_builtins.m test (PR #68163)

2023-10-03 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/68163 Sometimes unwind.h needs uint32_t also. >From cd2cc782937f9b0415733c48dcd1d9d8ab19ea48 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 3 Oct 2023 14:51:58 -0700 Subject: [PATCH] Fix the Modules/

[clang] Fix the Modules/compiler_builtins.m test (PR #68163)

2023-10-03 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Fix for https://lab.llvm.org/buildbot/#/builders/186/builds/12412 https://github.com/llvm/llvm-project/pull/68163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Fix the Modules/compiler_builtins.m test (PR #68163)

2023-10-03 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/68163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

2023-10-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/68241 All of the _Builtin_stdarg and _Builtin_stddef submodules need to be allowed from [no_undeclared_includes] modules. Split the builtin headers tests out from the compiler_builtins test so that the testi

[clang] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

2023-10-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/68241 >From 2c6f1a7b618f00f6fae2fddaab94a60a01f3ce90 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Wed, 4 Oct 2023 10:52:33 -0700 Subject: [PATCH] [Modules] no_undeclared_includes modules (Apple Darwin) d

[clang] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

2023-10-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: I could also revert most of the test changes and augment no-undeclared-includes-builtins.cpp, but I liked having a dedicated test that's not necessarily specific to Apple or glibc to test the intended system module setups with `-fbuiltin-headers-in-system-modules` set

[clang] [Modules] no_undeclared_includes modules (Apple Darwin) don't work the clang modules (PR #68241)

2023-10-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/68241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62f769a - [Headers] Add missing __need_ macros to stdarg.h

2023-08-23 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-08-23T23:55:30-07:00 New Revision: 62f769aa82f668a076fed2633e425631a4598a47 URL: https://github.com/llvm/llvm-project/commit/62f769aa82f668a076fed2633e425631a4598a47 DIFF: https://github.com/llvm/llvm-project/commit/62f769aa82f668a076fed2633e425631a4598a47.diff

[clang] 72da678 - [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-08-23T23:55:51-07:00 New Revision: 72da678d8c84c2cc442940a026ca50d0bb5c2b8e URL: https://github.com/llvm/llvm-project/commit/72da678d8c84c2cc442940a026ca50d0bb5c2b8e DIFF: https://github.com/llvm/llvm-project/commit/72da678d8c84c2cc442940a026ca50d0bb5c2b8e.diff

[clang] adb68c9 - [clang][modules] Add a c23 module feature

2023-08-29 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-08-29T11:11:14-07:00 New Revision: adb68c979d846a55bef2ea8208a69565e8c1a833 URL: https://github.com/llvm/llvm-project/commit/adb68c979d846a55bef2ea8208a69565e8c1a833 DIFF: https://github.com/llvm/llvm-project/commit/adb68c979d846a55bef2ea8208a69565e8c1a833.diff

[clang] 680da4b - [Headers][Modules] Make separate headers for the stdarg.h and stddef.h pieces so that they can be modularized

2023-08-30 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-08-30T11:41:12-07:00 New Revision: 680da4b5d7ec05a1e6656f2a7603a7b843268bab URL: https://github.com/llvm/llvm-project/commit/680da4b5d7ec05a1e6656f2a7603a7b843268bab DIFF: https://github.com/llvm/llvm-project/commit/680da4b5d7ec05a1e6656f2a7603a7b843268bab.diff

[libunwind] 1187d8a - [libunwind][Modules] Add unwind_arm_ehabi.h and unwind_itanium.h to the unwind module)

2023-03-20 Thread Ian Anderson via cfe-commits
Author: Ian Anderson Date: 2023-03-20T15:13:14-07:00 New Revision: 1187d8a62ba288e2221731f1795fa184571cd854 URL: https://github.com/llvm/llvm-project/commit/1187d8a62ba288e2221731f1795fa184571cd854 DIFF: https://github.com/llvm/llvm-project/commit/1187d8a62ba288e2221731f1795fa184571cd854.diff

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-03 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Does anything rely on the header guard? It would be good if we could remove it since textual headers are not generally expected to declare anything, even macros. https://github.com/llvm/llvm-project/pull/107155 ___ cfe-commit

[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

2024-09-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: That's true. Probably nobody's using this header anymore anyway so either way should be fine I think. https://github.com/llvm/llvm-project/pull/107155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang][modules] Enable built-in modules for the upcoming Apple releases (PR #102239)

2024-08-08 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: /cherry-pick 961639962251de7428c3fe93fa17cfa6ab3c561a 0f1361baf650641a59aaa1710d7a0b7b02f2e56d https://github.com/llvm/llvm-project/pull/102239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/102567 I forgot to update the version info in the SDKSettings file when I updated it to the real version relevant to the test. The version in the SDKSettings file isn't actually used for anything in the test

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/102567 >From 4bc7053e1383e6aa9e1a60017be296e305b8da5a Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Thu, 8 Aug 2024 21:54:40 -0700 Subject: [PATCH] Fix a unit test input file I forgot to update the versi

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/102567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a unit test input file (PR #102567)

2024-08-09 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/102567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > LGTM, though we should have a release note about the change because we've > been exposing the macro since Clang 17. I don't think this warrant a > potentially breaking change notice, though, just a regular bugfix one. I think we weren't exposing `unreachable` in C++

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-04 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > > Is that still worth mention in the release notes do you think? > > Oh duh, that's right, this requires someone to define the `__need` macro to > get it, so no, I don't think it needs a release note. Sorry for the noise! 👍 thanks for bearing with me on this! https:

[clang] [Headers] Don't declare unreachable() from stddef.h in C++ (PR #86748)

2024-04-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/86748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-04 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/83660 >From 63ff00ec49ac20c5ac97bd673166dabb0fb56136 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Fri, 1 Mar 2024 22:17:09 -0800 Subject: [PATCH] [clang][modules] Headers meant to be included multiple ti

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-05 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/83660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-10 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > @ian-twilightcoder this change seemed to cause our internal builds to run out > of source location space. > > ``` > remark: source manager location address space usage: [-Rsloc-usage] > note: 408559B in local locations, 2146921126B in locations loaded from AST > file

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-11 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Are your `textual` headers meant to be included more than once? If not, do they use header guards or `#pragma once`? https://github.com/llvm/llvm-project/pull/83660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-11 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > It's definitely caused by that change, reverting it fixes the failure. > > We use module maps so that some of our `#include` get processed as `#import`, > I believe the same code gets executed for our use-case. Because our setup is > so unusual, producing a repro is

[clang] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-11 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/88432 None >From 43b007bfb184c6fdb5d802afca16af14e555b628 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 9 Jul 2020 15:10:49 -0700 Subject: [PATCH] allow use of ptrauth module from no_undeclared_inclu

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Wow that's a _ton_ of PCM files. Why are your headers `textual` if they're only meant to be included once? Do they need to inherit the includer's preprocessor environment or something like that? https://github.com/llvm/llvm-project/pull/83660 __

[clang] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-12 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/88432 >From 88da8be7ed10f1ee8e7e992fdd59dce52456b2ce Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 9 Jul 2020 15:10:49 -0700 Subject: [PATCH] [modules] allow use of ptrauth module from no_undeclared_

[clang] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Upstream from Apple, followup for https://github.com/llvm/llvm-project/pull/65996. Allows Apple's Darwin module to include ptrauth.h without declaring a `use`. https://github.com/llvm/llvm-project/pull/88432 ___ cfe-commits m

[clang] [modules] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-12 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/88432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: I don't really think it's the same thing. The problem I'm trying to fix is that nobody knows when it's appropriate to use `#import` vs `#include`, and the unfortunate convention of Objective-C makes it impossible for header owners to indicate if they support being incl

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Also this change isn't trying to modify `#include` in any kind of way, _only_ `#import`. So it's quite intentional that your test behaves the same before and after. https://github.com/llvm/llvm-project/pull/83660 ___ cfe-comm

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-12 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > The end result should be that #imported and #pragma once-guarded files are > treated the same way as #ifndef-guarded files. While I don't necessarily disagree with that goal in principle, it wasn't true before this change either. There was already some special casing

[clang] [modules] allow use of ptrauth module from no_undeclared_includes system modules (PR #88432)

2024-04-12 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/88432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 011ff5a95a4a5de1dc6ae2d271ae42f28075b2b0 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > From Jan: > > > Maybe we can add the number of external HeaderFileInfos to > > HeaderSearch::PrintStats() and have a test that checks for it. > > The flag to enable that output is -show-stats I think. We tried this, but it seems that by the time the modules compile,

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From f6bcc20d07248069dee1ff19c1aa334152b311a8 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From a416e28efabdf812756f452b823c4b1e7388c865 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From bdb35190d9873e4413863be1bba842cb202842fc Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-13 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From eb296a4e28e54971f6e90e2fe4543ead4c7c2dbb Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
@@ -1313,11 +1313,19 @@ OptionalFileEntryRef HeaderSearch::LookupSubframeworkHeader( // File Info Management. //===--===// +static bool moduleMembershipNeedsMerge(const HeaderFileInfo *HFI, +

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
@@ -308,5 +308,73 @@ TEST_F(HeaderSearchTest, HeaderMapFrameworkLookup) { EXPECT_EQ(Search.getIncludeNameForHeader(FE), "Foo/Foo.h"); } +TEST_F(HeaderSearchTest, HeaderFileInfoMerge) { + auto AddHeader = [&](std::string HeaderPath) -> FileEntryRef { +VFS->addFile(Header

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-14 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/89005 >From 85df42bd55f76f8c77f44c78c8ccbe1bed8f8682 Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Tue, 16 Apr 2024 17:08:28 -0700 Subject: [PATCH] [clang][modules] HeaderSearch::MarkFileModuleHeader sets

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-15 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: The only error is in CodeGen/PowerPC/subreg-lanemasks.mir and doesn't look related to this change. https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][modules] HeaderSearch::MarkFileModuleHeader sets textual headers' HeaderFileInfo non-external when it shouldn't (PR #89005)

2024-06-15 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder closed https://github.com/llvm/llvm-project/pull/89005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-16 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: Wall of text incoming... Sorry but our documentation in this area is poor, so I feel like I need to spell out the assumptions behind this change. First of all, this _should_ be a relatively minor change that should affect a very limited set of circumstances. 1. Only `#

[clang] [clang][modules] Headers meant to be included multiple times can be completely invisible in clang module builds (PR #83660)

2024-04-16 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: > To get back to my previous point about the semantics implemented by this > patch being unfortunate -- the upshot is that, now: > > ``` > #include > #define NDEBUG > #import > ``` It would be nice if we could make this work without modules too. `#pragma many` or so

  1   2   3   >