blob: c02fe0fa3f3f1d25da9b138b1c7ead320e89dcc6 [file] [log] [blame]
David Greene4a37a692009-07-16 22:24:20 +00001// 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 - | llvm-as | \
4// RUN: llc --disable-fp-elim -f -O0 -relocation-model=pic | grep {# SrcLine 25}
5
6#include <stdlib.h>
7
8class DeepStack {
9 int seedVal;
10public:
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
23int main ( int argc, char** argv) {
24
25 DeepStack DS9( (argc > 1 ? atoi(argv[1]) : 0) );
26 return DS9.runit();
27}