[X86] Simplify some bitmasking and use llvm_unreachable to mark an impossible case...
[llvm-complete.git] / test / DebugInfo / dwarfdump-macho-relocs.test
blob801d8304b8a0fb97859b2c3a176847a6466239fb
1 // RUN: llvm-dwarfdump -debug-info %p/Inputs/dwarfdump-macho-relocs.macho.x86_64.o | FileCheck %s
3 // The dumped file has 2 functions in different sections of the __TEXT segment.
4 // Check that the addresses are are dumped correctly
6 // Compiled with: clang -x c -g -c -o dwarfdump-macho-relocs.macho.x86_64.o dwarfdump-macho-relocs.test
8 __attribute__((section("__TEXT,__blah")))
9 int foo() {
10         return 42;
13 // CHECK:  DW_TAG_subprogram
14 // CHECK-NEXT:    DW_AT_low_pc{{.*}}0x0000000000000020
15 // CHECK-NEXT:    DW_AT_high_pc{{.*}}0x000000000000002b
16 // CHECK-NEXT:    DW_AT_frame_base
17 // CHECK-NEXT:    DW_AT_name{{.*}}"foo"
19 int main() {
20         return foo();
23 // CHECK:  DW_TAG_subprogram
24 // CHECK-NEXT:    DW_AT_low_pc{{.*}}0x0000000000000000
25 // CHECK-NEXT:    DW_AT_high_pc{{.*}}0x000000000000001a
26 // CHECK-NEXT:    DW_AT_frame_base
27 // CHECK-NEXT:    DW_AT_name{{.*}}"main"