-
Notifications
You must be signed in to change notification settings - Fork 10.5k
bridging: reduce #ifdef USED_IN_CPP_SOURCE
in bridging headers
#77185
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
Conversation
@swift-ci test |
@hjyamauchi Can you please check that this change doesn't break anything on Windows ARM64? It should not, because it should make it even more robust. |
@eeckstein Sure thing. I have been locally testing the Windows ARM64 compiler with this patch: #77193 since October 1 or so. I will test the Windows ARM64 compiler with this change (#77185) and rebase #77193 after it and send it for review, if necessary. Thanks for taking care of this. |
@swift-ci please test macOS Platform |
@eeckstein My testing of the ARM64 compiler is a bit behind in terms of the git history where I've so far validated up to Oct 2 2024 or so (I'm working my way up toward tip of tree) and this PR doesn't cleanly apply at that point. It'd need to take me a while to test this patch. Alternatively, you are welcome to merge this now and I will follow up with testing later and a change if necessary. As you probably understand, the rule of thumb is (1) never put a constructor inside |
Oh, one thing I just noticed: swift/include/swift/Parse/ParseBridging.h Line 19 in 132726c
|
32aef46
to
4e35820
Compare
Yes, thanks! This is not needed at all. I cleaned up the header includes in the bridging files a bit. |
@swift-ci test |
BridgedDiagnosticArgument::BridgedDiagnosticArgument(const swift::DiagnosticArgument &arg) { | ||
*reinterpret_cast<swift::DiagnosticArgument *>(&storage) = arg; | ||
} |
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.
Nit: Looks like this needs clang-format
'ing
Especially avoid any constructors in `#ifdef USED_IN_CPP_SOURCE` blocks, because this breaks Windows ARM64.
4e35820
to
ed67e36
Compare
@swift-ci test |
👍 |
Especially avoid any constructors in
#ifdef USED_IN_CPP_SOURCE
blocks, because this breaks Windows ARM64.