brintos

brintos / llvm-project-archived public Read only

0
0
Text · 680 B · 9df41cf Raw
30 lines · c
1#include <stdio.h>2 3int inc(int a) {4  return a + 1;5}6 7int main() {8  printf("%p\n", inc);9  return 0;10}11 12// RUN: rm -rf %t && mkdir -p %t13// RUN: cp %s %t/14// RUN: cp %p/Inputs/print_context.o %t15// RUN: cd %t16// RUN: llvm-symbolizer --obj=%t/print_context.o 0x0 --print-source-context-lines=5 | FileCheck %s17 18// Inputs/print_context.o built with plain -g -c from this source file19// Specifying -Xclang -fdebug-compilation-dir -Xclang . to make the debug info20// location independent.21 22// CHECK: inc23// CHECK-NEXT: print_context.c:324// CHECK-NEXT: 1  : #include25// CHECK-NEXT: 2  :26// CHECK-NEXT: 3 >: int inc27// CHECK-NEXT: 4  :   return28// CHECK-NEXT: 5  : }29// CHECK-NOT:  630