llvm-project/clang/test/CodeGen/switch.c

18 lines
249 B
C
Raw Normal View History

// RUN: clang %s -emit-llvm | llvm-as | opt -std-compile-opts -disable-output
int foo(int i) {
int j = 0;
switch (i) {
case 1 :
j = 2; break;
case 2:
j = 3; break;
default:
j = 42; break;
}
j = j + 1;
return j;
}