forked from OSchip/llvm-project
18 lines
249 B
C
18 lines
249 B
C
|
// 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;
|
||
|
}
|
||
|
|
||
|
|