Skip to content

Commit 0cbaab6

Browse files
committed
add assert
Created using spr 1.3.5-bogner
1 parent f38b5fe commit 0cbaab6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/include/llvm/MC/MCSection.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ class MCRelaxableFragment : public MCEncodedFragment {
451451
return Inst;
452452
}
453453
void setInst(const MCInst &Inst) {
454+
// If we ever support Flags in relaxable fragments, revisit the data
455+
// structure.
456+
assert(Inst.getFlags() == 0 && "relaxable fragment doesn't support flags");
457+
454458
Opcode = Inst.getOpcode();
455459
auto &S = getParent()->MCOperandStorage;
456460
if (Inst.getNumOperands() > OperandSize) {

0 commit comments

Comments
 (0)