diff options
author | dianqk <dianqk@dianqk.net> | 2025-06-25 18:39:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-25 18:39:36 +0800 |
commit | 630d55cce45f8b409367914ef372047c8c43c511 (patch) | |
tree | 90d049c3824cfd6b02c52e038bd1fe9151dc4c23 /lldb/packages/Python/lldbsuite/test/gdbclientutils.py | |
parent | 892a263106af217c9d2c9d021a821c8531ad3559 (diff) | |
download | llvm-630d55cce45f8b409367914ef372047c8c43c511.zip llvm-630d55cce45f8b409367914ef372047c8c43c511.tar.gz llvm-630d55cce45f8b409367914ef372047c8c43c511.tar.bz2 |
[AsmPrinter] Always emit global equivalents if there is non-global uses (#145648)
A case found from https://github.com/rust-lang/rust/issues/142752:
https://llvm.godbolt.org/z/T7ce9saWh.
We should emit `@bar_0` for the following code:
```llvm
target triple = "x86_64-unknown-linux-gnu"
@rel_0 = private unnamed_addr constant [1 x i32] [
i32 trunc (i64 sub (i64 ptrtoint (ptr @bar_0 to i64), i64 ptrtoint (ptr @rel_0 to i64)) to i32)]
@bar_0 = internal unnamed_addr constant ptr @foo_0, align 8
@foo_0 = external global ptr, align 8
define void @foo(ptr %arg0) {
store ptr @bar_0, ptr %arg0, align 8
ret void
}
```
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
0 files changed, 0 insertions, 0 deletions