Declare frontend structs as extern cpp#10321
Conversation
|
Thanks for your pull request and interest in making D better, @edi33416! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10321" |
|
Hmm, |
| * Typesafe PIMPL idiom so we can keep CompiledCtfeFunction private. | ||
| */ | ||
| struct CompiledCtfeFunctionPimpl | ||
| extern (C++) struct CompiledCtfeFunctionPimpl |
There was a problem hiding this comment.
This is an internal struct? I think this can be ignored.
There was a problem hiding this comment.
This is because in FuncDeclaration we store a CompiledCtfeFunctionPimpl member field which was manually re-written in the declaration.h header file as CompiledCtfeFunction * (link)
There was a problem hiding this comment.
I also feel that this should stay private, but this was the easiest solution I came up with. Open to suggestions
There was a problem hiding this comment.
Ahh... used in func.d, in a rather weird way when comparing against the existing C++ header.
|
buildkite failure seems to be unrelated |
This PR is useful to the the C++ header generator to generate the dmd frontend header files that are used by
gdc.This is necessary because the generator takes into consideration only structs that are declared
extern (C++)