Commit Graph

5 Commits

Author SHA1 Message Date
Nate Chandler
cf6193c0db [Rebranch] Test: Redefine some macros.
Clang fixed a bug that was masking the fact that these macros aren't
always defined in cases we care about.  Just define our own version of
them for these tests.

rdar://127427660
2024-05-02 12:32:17 -07:00
Nate Chandler
aa277ca27f [Test] Disabled two tests under asan.
rdar://problem/100458402
2022-09-27 08:00:17 -07:00
Nate Chandler
71d993886a [IRGen] Emit bit for @main into entry section.
The _swift5_entry section contains a relative pointer to the entry-point
function (spelled variously _main and @main depending on context).
Support differentiating whether that entry point originates from a type
annotated @main or something else (i.e. main.swift) via a second
relative-pointer-sized field.  For now, that field is just a bit: 1 if
there is a type annotated @main, 0 otherwise.  In the future, that field
could be a relative pointer to the type descriptor for the type.
2022-09-26 11:02:09 -07:00
Nate Chandler
bfbc3a7570 [Test] Run __swift5_entry test on all Apple platforms.
Previously, the test was limited to only x86_64 macos.  Remove that
limitation by introducing the appropriate cross-platform typedef for
mach_header and signing the pointer before casting it to a function
pointer.
2020-08-04 15:51:30 -07:00
Nate Chandler
28cc144284 [IRGen] Add main() to __swift5_entry.
To enable lookup of the entry point, emit a pointer to that entry point
into a new section; on MachO, the __swift5_entry section of the __TEXT
segment.

rdar://problem/66402358
2020-08-03 15:40:16 -07:00