File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
test/Serialization/Safety Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -366,7 +366,8 @@ namespace swift {
366366
367367 // / Enable early skipping deserialization of decls that are marked as
368368 // / unsafe to read.
369- bool EnableDeserializationSafety = false ;
369+ bool EnableDeserializationSafety =
370+ ::getenv (" SWIFT_ENABLE_DESERIALIZATION_SAFETY" );
370371
371372 // / Whether to enable the new operator decl and precedencegroup lookup
372373 // / behavior. This is a staging flag, and will be removed in the future.
Original file line number Diff line number Diff line change 2323// RUN: -enable-deserialization-safety 2>&1 \
2424// RUN: | %FileCheck --check-prefixes=NEEDED,CLEAN,SAFE %s
2525
26+ /// Disabled by default.
27+ // RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
28+ // RUN: -verify -Xllvm -debug-only=Serialization \
29+ // RUN: -disable-deserialization-safety 2>&1 \
30+ // RUN: | %FileCheck --check-prefixes=NEEDED,UNSAFE %s
31+
32+ /// Enable with env var.
33+ // RUN: env SWIFT_ENABLE_DESERIALIZATION_SAFETY=true \
34+ // RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
35+ // RUN: -verify -Xllvm -debug-only=Serialization 2>&1 \
36+ // RUN: | %FileCheck --check-prefixes=NEEDED,CLEAN,SAFE %s
37+
2638/// Build against the swiftinterface.
2739// RUN: rm %t/Lib.swiftmodule
2840// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
You can’t perform that action at this time.
0 commit comments