diff options
-rw-r--r-- | llvm/include/llvm/MC/MCFragment.h | 21 | ||||
-rw-r--r-- | llvm/lib/MC/MCFragment.cpp | 4 |
2 files changed, 8 insertions, 17 deletions
diff --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h index 1ecbdbfa980..4722e9b2fa2 100644 --- a/llvm/include/llvm/MC/MCFragment.h +++ b/llvm/include/llvm/MC/MCFragment.h @@ -50,33 +50,24 @@ public: }; private: - FragmentType Kind; - -protected: - bool HasInstructions; - -private: - /// The layout order of this fragment. - unsigned LayoutOrder; - /// The data for the section this fragment is in. MCSection *Parent; /// The atom this fragment is in, as represented by its defining symbol. const MCSymbol *Atom; - /// \name Assembler Backend Data - /// @{ - // - // FIXME: This could all be kept private to the assembler implementation. - /// The offset of this fragment in its section. This is ~0 until /// initialized. uint64_t Offset; - /// @} + /// The layout order of this fragment. + unsigned LayoutOrder; + + FragmentType Kind; protected: + bool HasInstructions; + MCFragment(FragmentType Kind, bool HasInstructions, MCSection *Parent = nullptr); diff --git a/llvm/lib/MC/MCFragment.cpp b/llvm/lib/MC/MCFragment.cpp index f6b64c8fa95..a96b8e86aed 100644 --- a/llvm/lib/MC/MCFragment.cpp +++ b/llvm/lib/MC/MCFragment.cpp @@ -234,8 +234,8 @@ void ilist_alloc_traits<MCFragment>::deleteNode(MCFragment *V) { V->destroy(); } MCFragment::MCFragment(FragmentType Kind, bool HasInstructions, MCSection *Parent) - : Kind(Kind), HasInstructions(HasInstructions), LayoutOrder(0), - Parent(Parent), Atom(nullptr), Offset(~UINT64_C(0)) { + : Parent(Parent), Atom(nullptr), Offset(~UINT64_C(0)), LayoutOrder(0), + Kind(Kind), HasInstructions(HasInstructions) { if (Parent && !isa<MCDummyFragment>(*this)) Parent->getFragmentList().push_back(this); } |