-
-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix Issue 23343 - ImportC: functions declared with asm label to set s… #14486
Conversation
|
Thanks for your pull request, @WalterBright! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#14486" |
| @@ -1914,7 +1914,7 @@ final class CParser(AST) : Parser!AST | |||
| if (auto p = s.isDeclaration()) | |||
| { | |||
| auto str = asmName.peekString(); | |||
| p.mangleOverride = str; | |||
| p.mangleOverride = '*' ~ str; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have a string concatenation helper that avoids GC calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's necessary here.
58ee3b0 to
fe5e009
Compare
|
@WalterBright I'll let you decide which method you prefer. I have no problem with adding special handling in the codegen pass - though the other PR needs to expose any new enum constants to C++ in order to be usable. This method is not without its own side effects either - suddenly |
fe5e009 to
5a545bf
Compare
|
I figure if gcc users can abide by the '*' prefix, then we have an excuse in doing the same thing. |
5a545bf to
891043c
Compare
|
This scheme isn't going to work. Too many places where the identifier is used. |
…ymbol name gets extra underscore prepended
891043c to
6fb681e
Compare
That's a sign that you should have it all in reusable function. |
Does this mean #14485 is going to be preferred over this? |
…ymbol name gets extra underscore prepended
Rebooted due to @ibuclaw 's suggestion in #14485