Skip to content

Commit

Permalink
[MC] Remove duplicate Contents field from MCLEBFragment.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
topperc committed Nov 18, 2023
1 parent dc4786b commit 3b916ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/include/llvm/MC/MCFragment.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit 3b916ad

Please sign in to comment.