[llvm] [MC][ELF] Fix printing group signature symbols. (PR #112543)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 06:37:03 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mc
Author: Ivan Kosarev (kosarev)
<details>
<summary>Changes</summary>
They may be not known.
Change-Id: I66543240af2d10d77b4f7f23c06553356b3ec767
---
Full diff: https://github.com/llvm/llvm-project/pull/112543.diff
1 Files Affected:
- (modified) llvm/lib/MC/MCSectionELF.cpp (+4-2)
``````````diff
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp
index 25e62b70b5e2a0..3dc9a67e63939a 100644
--- a/llvm/lib/MC/MCSectionELF.cpp
+++ b/llvm/lib/MC/MCSectionELF.cpp
@@ -191,8 +191,10 @@ void MCSectionELF::printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
}
if (Flags & ELF::SHF_GROUP) {
- OS << ",";
- printName(OS, Group.getPointer()->getName());
+ if (const MCSymbolELF *Signature = Group.getPointer()) {
+ OS << ",";
+ printName(OS, Signature->getName());
+ }
if (isComdat())
OS << ",comdat";
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/112543
More information about the llvm-commits
mailing list