[2.079] WIP: 64-bit macOS (u)long mangling#2650
Merged
kinke merged 9 commits intoldc-developers:merge-2.079from Apr 15, 2018
Merged
[2.079] WIP: 64-bit macOS (u)long mangling#2650kinke merged 9 commits intoldc-developers:merge-2.079from
kinke merged 9 commits intoldc-developers:merge-2.079from
Conversation
Member
Author
|
I propose the following: we keep the old mangling scheme for LDC 1.9 and introduce the change when it's done properly upstream, presumably in the next version. The migration from magic structs to special enums ( |
This is a breaking ABI change and affects LDC itself as mixed D/C++ code base. So we now need to check the front-end version of the D host compiler and adapt the corresponding C++ types accordingly.
Primarily not to break size_t interop. A size_t is probably much more frequently used than `(unsigned) long long` (which Apple sadly chose for their C++ `(u)int64_t`).
To be mangled as C++ (unsigned) long long. For MSVC targets, D (u)long is C++-mangled as (unsigned) long long, so there's no need for these magic structs. For 32-bit POSIX targets, D (u)long is also a natural fit already. For 64-bit POSIX targets however, D (u)long is C++-mangled as (unsigned) long, so there's no corresponding D type, and these magic structs are needed. Especially since macOS defines `int64_t` as `long long`, unlike Linux (`long`).
This fixes 64bit-macOS-exclusive runnable/test18335.sh.
Member
Author
|
Merging in order to upgrade to 2.079.1; we can always revert to something else as this PR covers both options. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous discussion in #2647.