view test/DebugInfo/dwarfdump-macho-relocs.test @ 107:a03ddd01be7e

resolve warnings
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Sun, 31 Jan 2016 17:34:49 +0900
parents afa8332a0e37
children 803732b1fca8
line wrap: on
line source

// RUN: llvm-dwarfdump -debug-dump=info %p/Inputs/dwarfdump-macho-relocs.macho.x86_64.o | FileCheck %s

// The dumped file has 2 functions in different sections of the __TEXT segment.
// Check that the addresses are are dumped correctly

// Compiled with: clang -x c -g -c -o dwarfdump-macho-relocs.macho.x86_64.o dwarfdump-macho-relocs.test

__attribute__((section("__TEXT,__blah")))
int foo() {
        return 42;
}

// CHECK:  DW_TAG_subprogram
// CHECK-NEXT:    DW_AT_low_pc{{.*}}0x0000000000000020
// CHECK-NEXT:    DW_AT_high_pc{{.*}}0x000000000000002b
// CHECK-NEXT:    DW_AT_frame_base
// CHECK-NEXT:    DW_AT_name{{.*}}"foo"

int main() {
        return foo();
}

// CHECK:  DW_TAG_subprogram
// CHECK-NEXT:    DW_AT_low_pc{{.*}}0x0000000000000000
// CHECK-NEXT:    DW_AT_high_pc{{.*}}0x000000000000001a
// CHECK-NEXT:    DW_AT_frame_base
// CHECK-NEXT:    DW_AT_name{{.*}}"main"