Debian Codegraph @

clang/test/CodeGen/fake-use-while.c

raw
1 // RUN: %clang_cc1 %s -emit-llvm -fextend-variable-liveness -o - | FileCheck %s
2 //
3 // Check we don't assert when there is no more code after a while statement
4 // and the body of the while statement ends in a return, i.e. no insertion point
5 // is available.
6
7 // CHECK: define{{.*}}foo
8 // CHECK: call{{.*}}llvm.fake.use
9
10 void foo() {
11 {
12 while (1) {
13 int ret;
14 if (1)
15 return;
16 }
17 }
18 }