aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-symbolizer/Inputs/discrim.c
blob: 5500f094e10c668f331c3592d5dfab77ae54ba9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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();
}