Skip to content

Commit c72cb27

Browse files
committed
[MC] Remove assert to work around BOLT
BOLT used a dummy `MCAsmLayout` to call `getSymbolOffset`, which is technically not supported. There is some discussion in https://reviews.llvm.org/D154604 that this is not ideal. For now, remove the assert. The assert was added by bbb5036.
1 parent fb6e024 commit c72cb27

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

llvm/lib/MC/MCAssembler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ bool MCAssembler::getSymbolOffset(const MCSymbol &S, uint64_t &Val) const {
538538
}
539539

540540
uint64_t MCAssembler::getSymbolOffset(const MCSymbol &S) const {
541-
assert(HasLayout);
542541
uint64_t Val;
543542
getSymbolOffsetImpl(*this, S, true, Val);
544543
return Val;

0 commit comments

Comments
 (0)