Fix LDRi12 immediate operand, which was changed to be the second operand in $addrmode...
[oota-llvm.git] / test / FrontendC++ / 2009-07-15-LineNumbers.cpp
1 // This is a regression test on debug info to make sure that we can
2 // print line numbers in asm.
3 // RUN: %llvmgcc -S -O0 -g %s -o - | \
4 // RUN:    llc --disable-fp-elim -O0 -relocation-model=pic | grep {2009-07-15-LineNumbers.cpp:25$}
5
6 #include <stdlib.h>
7
8 class DeepStack {
9   int seedVal;
10 public:
11   DeepStack(int seed) : seedVal(seed) {}
12
13   int shallowest( int x ) { return shallower(x + 1); }
14   int shallower ( int x ) { return shallow(x + 2); }
15   int shallow   ( int x ) { return deep(x + 3); }
16   int deep      ( int x ) { return deeper(x + 4); }
17   int deeper    ( int x ) { return deepest(x + 6); }
18   int deepest   ( int x ) { return x + 7; }
19
20   int runit() { return shallowest(seedVal); }
21 };
22
23 int main ( int argc, char** argv) {
24
25   DeepStack DS9( (argc > 1 ? atoi(argv[1]) : 0) );
26   return DS9.runit();
27 }