Skip to content

Commit 940b7d9

Browse files
committed
[Tools] Explicitly disable deserialization safety in some testing tools
1 parent d1343c8 commit 940b7d9

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static bool validateModule(
6363
llvm::outs() << "error: loadFromSerializedAST() failed\n";
6464
return false;
6565
}
66+
CI.getLangOptions().EnableDeserializationSafety = false;
6667

6768
if (Verbose) {
6869
if (!info.shortVersion.empty())

tools/sil-opt/SILOpt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ int main(int argc, char **argv) {
562562
Invocation.getLangOptions().DisableAvailabilityChecking = true;
563563
Invocation.getLangOptions().EnableAccessControl = false;
564564
Invocation.getLangOptions().EnableObjCAttrRequiresFoundation = false;
565+
Invocation.getLangOptions().EnableDeserializationSafety = false;
565566
if (auto overrideKind = getASTOverrideKind()) {
566567
Invocation.getLangOptions().ASTVerifierOverride = *overrideKind;
567568
}

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3002,6 +3002,10 @@ static int doPrintModules(const CompilerInvocation &InitInvok,
30023002
bool SynthesizeExtensions) {
30033003
CompilerInvocation Invocation(InitInvok);
30043004

3005+
// Read everything from loaded modules, including internal details to
3006+
// test the behavior around non-public access levels.
3007+
Invocation.getLangOptions().EnableDeserializationSafety = false;
3008+
30053009
CompilerInstance CI;
30063010
// Display diagnostics to stderr.
30073011
PrintingDiagnosticConsumer PrintDiags;

0 commit comments

Comments
 (0)