Davide Italiano | 967cb19 | 2018-02-23 18:04:55 +0000 | [diff] [blame] | 1 | // REQUIRES: system-darwin |
| 2 | // Test that clang produces the __apple accelerator tables, |
| 3 | // e.g., __apple_types, correctly. |
Davide Italiano | 58c707d | 2018-02-26 20:56:45 +0000 | [diff] [blame] | 4 | // 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 Italiano | 967cb19 | 2018-02-23 18:04:55 +0000 | [diff] [blame] | 9 | // RUN: llvm-objdump -section-headers %t-ex | FileCheck %s |
| 10 | |
Wolfgang Pieb | 959fe03 | 2018-07-31 19:37:29 +0000 | [diff] [blame] | 11 | // 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 Italiano | 967cb19 | 2018-02-23 18:04:55 +0000 | [diff] [blame] | 14 | int 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 |