2016-01-09 08:14:35 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int inc(int a) {
|
|
|
|
return a + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
printf("%p\n", inc);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-08-21 01:05:22 +08:00
|
|
|
// RUN: rm -rf %t && mkdir -p %t
|
|
|
|
// RUN: cp %s %t/
|
|
|
|
// RUN: cp %p/Inputs/print_context.o %t
|
|
|
|
// RUN: cd %t
|
2019-01-31 22:04:47 +08:00
|
|
|
// RUN: llvm-symbolizer -obj=%t/print_context.o 0x0 -print-source-context-lines=5 | FileCheck %s
|
2017-07-31 01:16:32 +08:00
|
|
|
|
|
|
|
// Inputs/print_context.o built with plain -g -c from this source file
|
2017-07-31 01:26:34 +08:00
|
|
|
// Specifying -Xclang -fdebug-compilation-dir -Xclang . to make the debug info
|
|
|
|
// location independent.
|
2017-07-31 01:16:32 +08:00
|
|
|
|
|
|
|
// CHECK: inc
|
|
|
|
// CHECK: print_context.c:3
|
|
|
|
// CHECK: 1 : #include
|
|
|
|
// CHECK: 2 :
|
|
|
|
// CHECK: 3 >: int inc
|
|
|
|
// CHECK: 4 : return
|
|
|
|
// CHECK: 5 : }
|