Skip to content

Commit 90a23d3

Browse files
committed
[MC] Restore setOffset(0) in emitLabel
For bolt/test/runtime/X86/exceptions-pic.test, llvm-bolt seems to call emitLabel twice and the assert will fail. Work around it after 2cc4bc1
1 parent 34aa6c5 commit 90a23d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/MC/MCObjectStreamer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void MCObjectStreamer::emitLabel(MCSymbol *Symbol, SMLoc Loc) {
300300
// Assign all pending labels to offset 0 within the dummy "pending"
301301
// fragment. (They will all be reassigned to a real fragment in
302302
// flushPendingLabels())
303-
assert(Symbol->getOffset() == 0);
303+
Symbol->setOffset(0);
304304
addPendingLabel(Symbol);
305305
}
306306

0 commit comments

Comments
 (0)