We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2443063 commit 5bc1633Copy full SHA for 5bc1633
lib/SILOptimizer/IPO/CrossModuleOptimization.cpp
@@ -511,6 +511,10 @@ void CrossModuleOptimization::makeDeclUsableFromInline(ValueDecl *decl) {
511
if (decl->getEffectiveAccess() >= AccessLevel::Public)
512
return;
513
514
+ // We must not modify decls which are defined in other modules.
515
+ if (M.getSwiftModule() != decl->getDeclContext()->getParentModule())
516
+ return;
517
+
518
if (decl->getFormalAccess() < AccessLevel::Public &&
519
!decl->isUsableFromInline()) {
520
// Mark the nominal type as "usableFromInline".
0 commit comments