-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Modify clang declaration weakly-imported query to use Swift's code-gen target triple #81113
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
base: main
Are you sure you want to change the base?
Conversation
1e4a388
to
427c0ce
Compare
@@ -140,6 +140,7 @@ class ClangModuleLoader : public ModuleLoader { | |||
/// (The implementing `ClangImporter` class maintains separate Target info | |||
/// for use by IRGen/CodeGen clients) | |||
virtual clang::TargetInfo &getModuleAvailabilityTarget() const = 0; | |||
virtual clang::TargetInfo &getTargetInfo() const = 0; |
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.
Is this used?
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.
No, a vestige of a prior approach. Removed. Thank you.
|
||
//--- cheaders/Bar.h | ||
#pragma clang attribute push (__attribute__((availability(macOS, introduced=15.00))), apply_to=function) | ||
extern int funcBar(void); |
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.
For completeness I think it would be helpful to also test that a declaration with a < 15.0 introduction is not weak imported.
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.
Done!
…n target triple Similarly to how swiftlang#70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.
427c0ce
to
dde7fd4
Compare
Similarly to how #70564 configures 'ClangImporter's 'CodeGenerator' using Swift's compilation target triple, we must use the versioned version of the 'isWeakImported' query to determine linkage for imported Clang symbols.