Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / tools / llvm-symbolizer / print_context.c
blob5b80054416d688d557ba5f75d51f8198f99466f0
1 #include <stdio.h>
3 int inc(int a) {
4 return a + 1;
7 int main() {
8 printf("%p\n", inc);
9 return 0;
12 // RUN: rm -rf %t && mkdir -p %t
13 // RUN: cp %s %t/
14 // RUN: cp %p/Inputs/print_context.o %t
15 // RUN: cd %t
16 // RUN: llvm-symbolizer -obj=%t/print_context.o 0x0 -print-source-context-lines=5 | FileCheck %s
18 // Inputs/print_context.o built with plain -g -c from this source file
19 // Specifying -Xclang -fdebug-compilation-dir -Xclang . to make the debug info
20 // location independent.
22 // CHECK: inc
23 // CHECK: print_context.c:3
24 // CHECK: 1 : #include
25 // CHECK: 2 :
26 // CHECK: 3 >: int inc
27 // CHECK: 4 : return
28 // CHECK: 5 : }