File: print_context.c

package info (click to toggle)
llvm-toolchain-6.0 1:6.0.1-10
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 598,080 kB
  • sloc: cpp: 3,046,253; ansic: 595,057; asm: 271,965; python: 128,926; objc: 106,554; sh: 21,906; lisp: 10,191; pascal: 6,094; ml: 5,544; perl: 5,265; makefile: 2,227; cs: 2,027; xml: 686; php: 212; csh: 117
file content (29 lines) | stat: -rw-r--r-- 647 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

int inc(int a) {
  return a + 1;
}

int main() {
  printf("%p\n", inc);
  return 0;
}

// RUN: rm -rf %t && mkdir -p %t
// RUN: cp %s %t/
// RUN: cp %p/Inputs/print_context.o %t
// RUN: cd %t
// RUN: echo "%t/print_context.o 0x0" | llvm-symbolizer -print-source-context-lines=5 | FileCheck %s
// XFAIL: *

// Inputs/print_context.o built with plain -g -c from this source file
// Specifying -Xclang -fdebug-compilation-dir -Xclang . to make the debug info
// location independent.

// CHECK: inc
// CHECK: print_context.c:3
// CHECK: 1  : #include
// CHECK: 2  :
// CHECK: 3 >: int inc
// CHECK: 4  :   return
// CHECK: 5  : }