Skip to content

Commit c9d2e73

Browse files
committed
[MC][ELF] Fix printing group signature symbols.
They may be not known.
1 parent df05512 commit c9d2e73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/MC/MCSectionELF.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ void MCSectionELF::printSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
191191
}
192192

193193
if (Flags & ELF::SHF_GROUP) {
194-
OS << ",";
195-
printName(OS, Group.getPointer()->getName());
194+
if (const MCSymbolELF *Signature = Group.getPointer()) {
195+
OS << ",";
196+
printName(OS, Signature->getName());
197+
}
196198
if (isComdat())
197199
OS << ",comdat";
198200
}

0 commit comments

Comments
 (0)