mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-09 05:57:23 +00:00
![Frederic Riss](/assets/img/avatar_default.png)
The value of an inlined subprogram low_pc attribute should not get relocated, but it can happen that it matches the enclosing function's start address and thus gets the generic treatment. Special case it to avoid applying the PC offset twice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246406 91177308-0d34-0410-b5e6-96231b3b80d8
16 lines
549 B
C
16 lines
549 B
C
/* Compiled with: clang -arch=arm64 -O2 -g -c inlined_low_pc.c */
|
|
|
|
static int foo(int i) { return 42 + i; }
|
|
int bar(int a) { return foo(a); }
|
|
|
|
// RUN: llvm-dsymutil -f -y %p/dummy-debug-map-amr64.map -oso-prepend-path %p/../Inputs/inlined-low_pc -o - | llvm-dwarfdump - | FileCheck %s
|
|
|
|
// CHECK: DW_TAG_subprogram
|
|
// CHECK: DW_AT_low_pc{{.*}}0x0000000000010000
|
|
// CHECK: DW_AT_name{{.*}}"bar"
|
|
// CHECK-NOT: NULL
|
|
// CHECK: DW_TAG_inlined_subroutine
|
|
// CHECK-NEXT: DW_AT_abstract_origin{{.*}}"foo"
|
|
// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000010000
|
|
|