PowerPC: Avoid MCSymbol::isUnset

"unset" is not a meaningful separae state and it will be merged into
"undefined".

https://reviews.llvm.org/D72570 ported a GAS hack that moves the label
when a prefixed instruction on the same source line needs automatic
alignment. However, we can used isDefined instead of isUnset.
This commit is contained in:
Fangrui Song 2025-08-03 20:17:31 -07:00
parent 8b03b3bd4d
commit 781e5f0b5d

View File

@ -65,7 +65,7 @@ void PPCELFStreamer::emitPrefixedInstruction(const MCInst &Inst,
MCFragment *InstructionFragment = getCurrentFragment();
SMLoc InstLoc = Inst.getLoc();
// Check if there was a last label emitted.
if (LastLabel && !LastLabel->isUnset() && LastLabelLoc.isValid() &&
if (LastLabel && LastLabel->isDefined() && LastLabelLoc.isValid() &&
InstLoc.isValid()) {
const SourceMgr *SourceManager = getContext().getSourceManager();
unsigned InstLine = SourceManager->FindLineNumber(InstLoc);