Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dsymutil] Avoid relocating DW_AT_call_pc twice
Summary: Avoid relocating DW_AT_call_pc, e.g. when a call PC is equal to the function's low_pc as is the case in the test: ``` __Z5func1v: 0000000100007f94 b __Z5func2v ``` rdar://62952440 Reviewers: friss, JDevlieghere Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79536
- Loading branch information
Showing
4 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Instructions to reproduce | ||
------------------------- | ||
|
||
$ cat main.cpp | ||
void __attribute__((optnone)) func2() {} | ||
void __attribute__((noinline)) func1() { func2(); /* tail */ } | ||
int __attribute__((disable_tail_calls)) main() { | ||
func1(); /* regular */ | ||
return 0; | ||
} | ||
|
||
# Adding `-isysroot $(xcrun -sdk iphoneos.internal -show-sdk-path)` can fix | ||
# linker warnings when building on macOS. | ||
$ clang -arch arm64 main.cpp -o main.arm64.o -c -g -O2 | ||
$ clang -arch arm64 main.arm64.o -o main.arm64 -g | ||
|
||
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/call_pc/main.arm64 -o %t.dSYM | ||
RUN: llvm-dwarfdump %t.dSYM | FileCheck %s -implicit-check-not=DW_AT_call_pc | ||
|
||
CHECK: DW_AT_call_pc (0x0000000100007f94) |
Binary file not shown.
Binary file not shown.