mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This follows the design of how we handled this with sil-verify-all. Specifically, the default behavior is to run only in asserts builds, but one can use the two flags: enable-ast-verifier and disable-ast-verifier to override the default behavior. The reason why this is interesting is that this means that when compiling normally, we will not run the verifier, so we won't have a perf hit. But we can now ask the user to run with this flag (or in a future maybe a re-run in the driver would do this for them), saving us time when screening bugs by avoiding the need to build an asserts compiler to triage if the ASTVerifier would catch the bug.
11 lines
436 B
Swift
11 lines
436 B
Swift
// This source file is part of the Swift.org open source project
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
|
|
// RUN: not %target-swift-frontend -enable-ast-verifier %s -emit-ir
|
|
|
|
switch{case.b(u){
|