File: apple-accel.cpp

package info (click to toggle)
llvm-toolchain-18 1%3A18.1.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,908,340 kB
  • sloc: cpp: 6,667,937; ansic: 1,440,452; asm: 883,619; python: 230,549; objc: 76,880; f90: 74,238; lisp: 35,989; pascal: 16,571; sh: 10,229; perl: 7,459; ml: 5,047; awk: 3,523; makefile: 2,987; javascript: 2,149; xml: 892; fortran: 649; cs: 573
file content (23 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// REQUIRES: system-darwin
// Test that clang produces the __apple accelerator tables,
// e.g., __apple_types, correctly.
// These sections are going to be retired in DWARF 5, so we hardcode
// the DWARF version in the tests.
// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-2 -O0 -c -g -o %t-ex
// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s
// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-4 -O0 -c -g -o %t-ex
// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s

// A function in a different section forces the compiler to create the
// __debug_ranges section.
__attribute__((section("1,__text_foo"))) void foo() {}
int main (int argc, char const *argv[]) { return argc; }

// CHECK-DAG: __debug_abbrev
// CHECK-DAG: __debug_info
// CHECK-DAG: __debug_str
// CHECK-DAG: __debug_ranges
// CHECK-DAG: __apple_names
// CHECK-DAG: __apple_objc
// CHECK-DAG: __apple_namespac
// CHECK-DAG: __apple_types