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 {
366
366
367
367
// / Enable early skipping deserialization of decls that are marked as
368
368
// / unsafe to read.
369
- bool EnableDeserializationSafety = false ;
369
+ bool EnableDeserializationSafety =
370
+ ::getenv (" SWIFT_ENABLE_DESERIALIZATION_SAFETY" );
370
371
371
372
// / Whether to enable the new operator decl and precedencegroup lookup
372
373
// / behavior. This is a staging flag, and will be removed in the future.
Original file line number Diff line number Diff line change 23
23
// RUN: -enable-deserialization-safety 2>&1 \
24
24
// RUN: | %FileCheck --check-prefixes=NEEDED,CLEAN,SAFE %s
25
25
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
+
26
38
/// Build against the swiftinterface.
27
39
// RUN: rm %t/Lib.swiftmodule
28
40
// RUN: %target-swift-frontend -typecheck %t/Client.swift -I %t \
You can’t perform that action at this time.
0 commit comments