File: embedded-source.test

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (34 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (9)
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
30
31
32
33
34
; RUN: llvm-objdump -d --line-numbers %p/Inputs/embedded-source | FileCheck --check-prefix=LINE %s
; RUN: llvm-objdump -d --source       %p/Inputs/embedded-source | FileCheck --check-prefix=SOURCE %s
; REQUIRES: x86-registered-target

; Source for embedded-source.c
; To regenerate this file:
;   clang -gdwarf-5 -gembed-source embedded-source.c -o embedded-source
;
; int main(int argc, char *argv[]) {
;   int i = 2;
;   i += 1;
;   return i;
; }

; LINE: <main>:
; LINE-NEXT: ; main():
; LINE-NEXT: ; {{.*}}embedded-source.c:1
; LINE-NEXT: pushq %rbp
; LINE: ; {{.*}}embedded-source.c:2
; LINE-NEXT: movl $2
; LINE: ; {{.*}}embedded-source.c:3
; LINE: addl $1
; LINE: ; {{.*}}embedded-source.c:4
; LINE: retq

; SOURCE: <main>:
; SOURCE-NEXT: ; int main(int argc, char *argv[]) {
; SOURCE-NEXT: pushq %rbp
; SOURCE: ; int i = 2;
; SOURCE-NEXT: movl $2
; SOURCE: ; i += 1;
; SOURCE: addl $1
; SOURCE: ; return i;
; SOURCE: retq