File: mccas-replay-test.cpp

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (31 lines) | stat: -rw-r--r-- 1,717 bytes parent folder | download
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
// RUN: rm -rf %t && mkdir -p %t
// RUN: export LLVM_CACHE_CAS_PATH=%t/cas && %clang-cache \
// RUN:   %clang -target arm64-apple-macosx12.0.0 -c -Xclang -fcas-backend -Rcompile-job-cache %s -o %t/tmp.o -g 2>&1 | FileCheck %s -check-prefix=CACHE-MISS
// CACHE-MISS: remark: compile job cache miss

// RUN: llvm-objdump -h %t/tmp.o | FileCheck %s -check-prefix=CHECK-OBJDUMP

// RUN: export LLVM_CACHE_CAS_PATH=%t/cas && %clang-cache \
// RUN:   %clang -target arm64-apple-macosx12.0.0 -c -Xclang -fcas-backend -Rcompile-job-cache %s -o %t/tmp.o -g 2>&1 | FileCheck %s -check-prefix=CACHE-HIT
// CACHE-HIT: remark: compile job cache hit

// RUN: llvm-objdump -h %t/tmp.o 2>&1 | FileCheck %s -check-prefix=CHECK-OBJDUMP

// CHECK-OBJDUMP: Sections:
// CHECK-OBJDUMP-NEXT: Idx Name             Size     VMA              Type
// CHECK-OBJDUMP-NEXT:   0 __text           {{[0-9a-f]+}} {{[0-9a-f]+}} TEXT
// CHECK-OBJDUMP-NEXT:   1 __debug_abbrev   {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   2 __debug_info     {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   3 __debug_str      {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   4 __apple_names    {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   5 __apple_objc     {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   6 __apple_namespac {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   7 __apple_types    {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG
// CHECK-OBJDUMP-NEXT:   8 __compact_unwind {{[0-9a-f]+}} {{[0-9a-f]+}} DATA
// CHECK-OBJDUMP-NEXT:   9 __debug_line     {{[0-9a-f]+}} {{[0-9a-f]+}} DATA, DEBUG

// REQUIRES: aarch64-registered-target

int foo() {
    return 1;
}