File tree 4 files changed +8
-5
lines changed
4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ class ClangModuleLoader : public ModuleLoader {
140
140
// / (The implementing `ClangImporter` class maintains separate Target info
141
141
// / for use by IRGen/CodeGen clients)
142
142
virtual clang::TargetInfo &getModuleAvailabilityTarget () const = 0;
143
+ virtual clang::TargetInfo &getTargetInfo () const = 0;
143
144
144
145
virtual clang::ASTContext &getClangASTContext () const = 0;
145
146
virtual clang::Preprocessor &getClangPreprocessor () const = 0;
Original file line number Diff line number Diff line change @@ -570,7 +570,7 @@ class ClangImporter final : public ClangModuleLoader {
570
570
// / instead. To distinguish IRGen clients from module loading clients,
571
571
// / `getModuleAvailabilityTarget` should be used instead by module-loading
572
572
// / clients.
573
- clang::TargetInfo &getTargetInfo () const ;
573
+ clang::TargetInfo &getTargetInfo () const override ;
574
574
clang::CodeGenOptions &getCodeGenOpts () const ;
575
575
576
576
std::string getClangModuleHash () const ;
Original file line number Diff line number Diff line change 75
75
76
76
#include " clang/Basic/CharInfo.h"
77
77
#include " clang/Basic/Module.h"
78
+ #include " clang/Basic/TargetInfo.h"
78
79
#include " clang/AST/Attr.h"
79
80
#include " clang/AST/DeclObjC.h"
80
81
@@ -1468,9 +1469,9 @@ AvailabilityRange Decl::getAvailabilityForLinkage() const {
1468
1469
1469
1470
bool Decl::isAlwaysWeakImported () const {
1470
1471
// For a Clang declaration, trust Clang.
1471
- if (auto clangDecl = getClangDecl ()) {
1472
- return clangDecl->isWeakImported ();
1473
- }
1472
+ if (auto clangDecl = getClangDecl ())
1473
+ return clangDecl->isWeakImported (
1474
+ getASTContext (). LangOpts . getMinPlatformVersion ());
1474
1475
1475
1476
if (getAttrs ().hasAttribute <WeakLinkedAttr>())
1476
1477
return true ;
Original file line number Diff line number Diff line change @@ -618,7 +618,8 @@ bool SILFunction::isWeakImported(ModuleDecl *module) const {
618
618
619
619
// For imported functions check the Clang declaration.
620
620
if (ClangNodeOwner)
621
- return ClangNodeOwner->getClangDecl ()->isWeakImported ();
621
+ return ClangNodeOwner->getClangDecl ()->isWeakImported (
622
+ getASTContext ().LangOpts .getMinPlatformVersion ());
622
623
623
624
// For native functions check a flag on the SILFunction
624
625
// itself.
You can’t perform that action at this time.
0 commit comments