llvm-for-llvmta/test/tools/llvm-symbolizer/Inputs/discrim.c

16 lines
365 B
C
Raw Normal View History

2022-04-25 10:02:23 +02:00
// Compile with: clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim
// to get an input file with DWARF line table discriminators in it.
// Tested in test/tools/llvm-symbolizer/sym-verbose.test
static volatile int do_mul;
static volatile int x, v;
int foo () {
if (do_mul) x *= v; else x /= v;
return x;
}
int main() {
return foo() + foo();
}