Add Target.cppTypeMangle hook for vendor types.#6887
Merged
WalterBright merged 3 commits intodlang:masterfrom Jun 13, 2017
Merged
Add Target.cppTypeMangle hook for vendor types.#6887WalterBright merged 3 commits intodlang:masterfrom
WalterBright merged 3 commits intodlang:masterfrom
Conversation
Member
|
@ibuclaw vendor-type is a wired name. |
Member
Author
It's a perfectly reasonable name.
Sounds too german. |
Member
Author
|
I forgot to mention that this also allows compilers to use internal information they have on the default C++ ABI. So if |
Member
Author
|
@redstar / @klickverbot - SYN. |
Contributor
|
@ibuclaw: ACK. (… SYN ACK?) |
Member
Author
|
@klickverbot - ACK. |
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.
This patch adds
Target.cppMangleType, which returns a pointer to statically allocated string containing the target/vendor-specific mangling for the given type.While this could apply for any type, have only added it to the basic, vector, and struct type visitor passes for now. DMD does nothing with this, however these specific places should catch all of the following:
realmay be a__float128type mangled asg(alpha, ia64, ppc, systemz, sparc, x86)realmay be mangled as a vendor typeU10__float128(ppc) oru9__float80(ia64)va_listmay be mangled as if it is in the "std" namespaceSt9__va_list(arm, aarch64)__vector()may differ depending on the default C++ ABIDv(abi >= 4)This replaces
Target.realislongdouble.See https://github.com/dlang/dmd/pull/6887/files?w=1 to read diff without whitespace changes.
Fixes the frontend part of bug reported against gdc: https://bugzilla.gdcproject.org/show_bug.cgi?id=247
FYI: @redstar / @klickverbot - this would affect you.