ldc/tests/codegen/checkaction_halt.d
2020-05-16 01:17:21 +02:00

11 lines
281 B
D

// RUN: %ldc -checkaction=halt -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
// CHECK: define {{.*}}_D16checkaction_halt3foo
void foo(int x)
{
assert(x, "msg");
// CHECK: assertFailed:
// CHECK-NEXT: call void @llvm.trap()
// CHECK-NEXT: unreachable
}