Mike Aizatsky | 17dbc28 | 2016-01-09 00:14:35 +0000 | [diff] [blame] | 1 | // REQUIRES: x86_64-linux |
| 2 | // RUN: %host_cc -O0 -g %s -o %t 2>&1 |
Mandeep Singh Grang | 029a056 | 2016-04-19 23:51:52 +0000 | [diff] [blame] | 3 | // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s |
Mike Aizatsky | 17dbc28 | 2016-01-09 00:14:35 +0000 | [diff] [blame] | 4 | |
| 5 | #include <stdio.h> |
| 6 | |
| 7 | int inc(int a) { |
| 8 | return a + 1; |
| 9 | } |
| 10 | |
| 11 | int main() { |
| 12 | printf("%p\n", inc); |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | // CHECK: inc |
| 17 | // CHECK: print_context.c:7 |
| 18 | // CHECK: 5 : #include |
| 19 | // CHECK: 6 : |
| 20 | // CHECK: 7 >: int inc |
| 21 | // CHECK: 8 : return |
| 22 | // CHECK: 9 : } |