aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCCodeView.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-08-02 15:17:00 -0700
committerFangrui Song <i@maskray.me>2025-08-02 15:17:00 -0700
commitfaa931b717c02d57f0814caa9133219040e6a85b (patch)
tree1d67a3b76117e4ab55beddfa38f9e60ecff52955 /llvm/lib/MC/MCCodeView.cpp
parent21f1f9558df3830ffa637def364e3c0cb0dbb3c0 (diff)
downloadllvm-faa931b717c02d57f0814caa9133219040e6a85b.zip
llvm-faa931b717c02d57f0814caa9133219040e6a85b.tar.gz
llvm-faa931b717c02d57f0814caa9133219040e6a85b.tar.bz2
MCFragment: Store the number of variable-size tail fixups as uint8_t
Decrease sizeof(MCFragment) by 8 on 64-bit machines.
Diffstat (limited to 'llvm/lib/MC/MCCodeView.cpp')
-rw-r--r--llvm/lib/MC/MCCodeView.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCCodeView.cpp b/llvm/lib/MC/MCCodeView.cpp
index 7d528a5..3a5f01c 100644
--- a/llvm/lib/MC/MCCodeView.cpp
+++ b/llvm/lib/MC/MCCodeView.cpp
@@ -695,5 +695,7 @@ void CodeViewContext::encodeDefRange(const MCAssembler &Asm,
}
Frag.setVarContents(Contents);
+ assert(Fixups.size() < 256 && "Store fixups outside of MCFragment's VarFixup "
+ "storage if the number ever exceeds 256");
Frag.setVarFixups(Fixups);
}