mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Serialization: Consider the C++ interop use in module cache hash
It is expected to rebuild modules from swiftinterface when the C++ interop is enabled in clients. The swiftmodule produced is different. Make sure the rebuilt module is kept under a distinct cache key to avoid reusing previously compiled modules in an incompatible mode.
This commit is contained in:
@@ -2880,7 +2880,11 @@ static std::string getContextHash(const CompilerInvocation &CI,
|
||||
//
|
||||
// If OSSA modules are enabled, we use a separate namespace of modules to
|
||||
// ensure that we compile all swift interface files with the option set.
|
||||
unsigned(CI.getSILOptions().EnableOSSAModules));
|
||||
unsigned(CI.getSILOptions().EnableOSSAModules),
|
||||
|
||||
// Is the C++ interop enabled?
|
||||
unsigned(CI.getLangOptions().EnableCXXInterop)
|
||||
);
|
||||
|
||||
return llvm::toString(llvm::APInt(64, H), 36, /*Signed=*/false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user