llvm-project/debuginfo-tests/apple-accel.cpp
Davide Italiano 58c707d1ad [Darwin] Specify DWARF 2/4 when running apple accelerator tests.
These sections will be retired. Also, explicitly list llvm-objdump
as a dependency. This should've been done in the previous commit,
but I failed to squash the two changes together.

Thanks to Adrian for pointing the first problem out in a comment.

llvm-svn: 326121
2018-02-26 20:56:45 +00:00

22 lines
820 B
C++

// 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
int main (int argc, char const *argv[]) { return argc; }
// CHECK: __debug_str
// CHECK-NEXT: __debug_abbrev
// CHECK-NEXT: __debug_info
// CHECK-NEXT: __debug_ranges
// CHECK-NEXT: __debug_macinfo
// CHECK-NEXT: __apple_names
// CHECK-NEXT: __apple_objc
// CHECK-NEXT: __apple_namespac
// CHECK-NEXT: __apple_types