blob: 4a73afe80113ba644e5139c439b00f61467b0995 [file] [log] [blame]
Davide Italiano967cb192018-02-23 18:04:55 +00001// REQUIRES: system-darwin
2// Test that clang produces the __apple accelerator tables,
3// e.g., __apple_types, correctly.
Davide Italiano58c707d2018-02-26 20:56:45 +00004// These sections are going to be retired in DWARF 5, so we hardcode
5// the DWARF version in the tests.
6// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-2 -O0 -c -g -o %t-ex
7// RUN: llvm-objdump -section-headers %t-ex | FileCheck %s
8// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-4 -O0 -c -g -o %t-ex
Davide Italiano967cb192018-02-23 18:04:55 +00009// RUN: llvm-objdump -section-headers %t-ex | FileCheck %s
10
Wolfgang Pieb959fe032018-07-31 19:37:29 +000011// A function in a different section forces the compiler to create the
12// __debug_ranges section.
13__attribute__((section("1,__text_foo"))) void foo() {}
Davide Italiano967cb192018-02-23 18:04:55 +000014int main (int argc, char const *argv[]) { return argc; }
15
16// CHECK: __debug_str
17// CHECK-NEXT: __debug_abbrev
18// CHECK-NEXT: __debug_info
19// CHECK-NEXT: __debug_ranges
20// CHECK-NEXT: __debug_macinfo
21// CHECK-NEXT: __apple_names
22// CHECK-NEXT: __apple_objc
23// CHECK-NEXT: __apple_namespac
24// CHECK-NEXT: __apple_types