summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-11-18 10:28:43 -0800
committerCraig Topper <craig.topper@sifive.com>2023-11-18 10:30:17 -0800
commit3b916ad6733b04a86ca0aec57be647daf4647d5b (patch)
tree43b22500273af1dd7968604c9461e4da3114bec5
parentdc4786b4877d67d73d3892c45baf6811af0e6f57 (diff)
[MC] Remove duplicate Contents field from MCLEBFragment.
There's already a Contents field in the MCEncodedFragmentWithFixups base class. The Contents field in MCLEBFragment is private and there is no accessor for it. It is initialized in the constructor, but that should probably initialize the base class version.
-rw-r--r--llvm/include/llvm/MC/MCFragment.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h
index efe44b0b6917..c314fdd3aa69 100644
--- a/llvm/include/llvm/MC/MCFragment.h
+++ b/llvm/include/llvm/MC/MCFragment.h
@@ -435,13 +435,11 @@ class MCLEBFragment final : public MCEncodedFragmentWithFixups<10, 1> {
/// The value this fragment should contain.
const MCExpr *Value;
- SmallString<8> Contents;
-
public:
MCLEBFragment(const MCExpr &Value, bool IsSigned, MCSection *Sec = nullptr)
: MCEncodedFragmentWithFixups<10, 1>(FT_LEB, false, Sec),
IsSigned(IsSigned), Value(&Value) {
- Contents.push_back(0);
+ getContents().push_back(0);
}
const MCExpr &getValue() const { return *Value; }