blob: 2705c29a5fb2d4c8a1fadf335152cc1982e09875 [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
Jonas Devlieghere54146cb2020-03-15 20:56:33 -07007// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s
Davide Italiano58c707d2018-02-26 20:56:45 +00008// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-4 -O0 -c -g -o %t-ex
Jonas Devlieghere54146cb2020-03-15 20:56:33 -07009// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s
Davide Italiano967cb192018-02-23 18:04:55 +000010
Jonas Devlieghere8a44d482019-11-11 10:40:06 -080011// A function in a different section forces the compiler to create the
Wolfgang Pieb959fe032018-07-31 19:37:29 +000012// __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
Adrian Prantl248435e2020-02-07 15:09:44 -080016// CHECK-DAG: __debug_abbrev
17// CHECK-DAG: __debug_info
18// CHECK-DAG: __debug_str
19// CHECK-DAG: __debug_ranges
20// CHECK-DAG: __apple_names
21// CHECK-DAG: __apple_objc
22// CHECK-DAG: __apple_namespac
23// CHECK-DAG: __apple_types