1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-dwarfdump -debug-dump=info %p/Inputs/dwarfdump-macho-relocs.macho.x86_64.o | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker// The dumped file has 2 functions in different sections of the __TEXT segment. 4*9880d681SAndroid Build Coastguard Worker// Check that the addresses are are dumped correctly 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker// Compiled with: clang -x c -g -c -o dwarfdump-macho-relocs.macho.x86_64.o dwarfdump-macho-relocs.test 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker__attribute__((section("__TEXT,__blah"))) 9*9880d681SAndroid Build Coastguard Workerint foo() { 10*9880d681SAndroid Build Coastguard Worker return 42; 11*9880d681SAndroid Build Coastguard Worker} 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker// CHECK: DW_TAG_subprogram 14*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000000020 15*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000002b 16*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_frame_base 17*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_name{{.*}}"foo" 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerint main() { 20*9880d681SAndroid Build Coastguard Worker return foo(); 21*9880d681SAndroid Build Coastguard Worker} 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker// CHECK: DW_TAG_subprogram 24*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000000000 25*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_high_pc{{.*}}0x000000000000001a 26*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_frame_base 27*9880d681SAndroid Build Coastguard Worker// CHECK-NEXT: DW_AT_name{{.*}}"main" 28