Skip to content

Commit 781e5f0

Browse files
committed
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.
1 parent 8b03b3b commit 781e5f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void PPCELFStreamer::emitPrefixedInstruction(const MCInst &Inst,
6565
MCFragment *InstructionFragment = getCurrentFragment();
6666
SMLoc InstLoc = Inst.getLoc();
6767
// Check if there was a last label emitted.
68-
if (LastLabel && !LastLabel->isUnset() && LastLabelLoc.isValid() &&
68+
if (LastLabel && LastLabel->isDefined() && LastLabelLoc.isValid() &&
6969
InstLoc.isValid()) {
7070
const SourceMgr *SourceManager = getContext().getSourceManager();
7171
unsigned InstLine = SourceManager->FindLineNumber(InstLoc);

0 commit comments

Comments
 (0)