Skip to content

Commit 0f2911f

Browse files
committed
[embedded] When loading (sub-)modules, propagate the Embedded flag and use it for hash computation
1 parent e71ede1 commit 0f2911f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,6 +2079,11 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
20792079
GenericArgs.push_back("-stdlib=libc++");
20802080
}
20812081
}
2082+
2083+
// Inherit Embedded Swift
2084+
if (langOpts.hasFeature(Feature::Embedded)) {
2085+
genericSubInvocation.getLangOptions().enableFeature(Feature::Embedded);
2086+
}
20822087
}
20832088

20842089
/// Calculate an output filename in \p genericSubInvocation's cache path that
@@ -2912,7 +2917,10 @@ static std::string getContextHash(const CompilerInvocation &CI,
29122917
unsigned(CI.getSILOptions().EnableOSSAModules),
29132918

29142919
// Is the C++ interop enabled?
2915-
unsigned(CI.getLangOptions().EnableCXXInterop)
2920+
unsigned(CI.getLangOptions().EnableCXXInterop),
2921+
2922+
// Is Embedded Swift enabled?
2923+
unsigned(CI.getLangOptions().hasFeature(Feature::Embedded))
29162924
);
29172925

29182926
return llvm::toString(llvm::APInt(64, H), 36, /*Signed=*/false);

0 commit comments

Comments
 (0)