diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/MC/MCFragment.h | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/MC/MCFragment.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/MC/MCFragment.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/contrib/libs/llvm12/include/llvm/MC/MCFragment.h b/contrib/libs/llvm12/include/llvm/MC/MCFragment.h index b6f7f628ff..a9bc653f87 100644 --- a/contrib/libs/llvm12/include/llvm/MC/MCFragment.h +++ b/contrib/libs/llvm12/include/llvm/MC/MCFragment.h @@ -44,7 +44,7 @@ public: FT_Data, FT_CompactEncodedInst, FT_Fill, - FT_Nops, + FT_Nops, FT_Relaxable, FT_Org, FT_Dwarf, @@ -54,7 +54,7 @@ public: FT_SymbolId, FT_CVInlineLines, FT_CVDefRange, - FT_PseudoProbe, + FT_PseudoProbe, FT_Dummy }; @@ -72,10 +72,10 @@ private: /// The layout order of this fragment. unsigned LayoutOrder; - /// The subsection this fragment belongs to. This is 0 if the fragment is not - // in any subsection. - unsigned SubsectionNumber = 0; - + /// The subsection this fragment belongs to. This is 0 if the fragment is not + // in any subsection. + unsigned SubsectionNumber = 0; + FragmentType Kind; /// Whether fragment is being laid out. @@ -114,9 +114,9 @@ public: bool hasInstructions() const { return HasInstructions; } void dump() const; - - void setSubsectionNumber(unsigned Value) { SubsectionNumber = Value; } - unsigned getSubsectionNumber() const { return SubsectionNumber; } + + void setSubsectionNumber(unsigned Value) { SubsectionNumber = Value; } + unsigned getSubsectionNumber() const { return SubsectionNumber; } }; class MCDummyFragment : public MCFragment { @@ -155,7 +155,7 @@ public: case MCFragment::FT_Data: case MCFragment::FT_Dwarf: case MCFragment::FT_DwarfFrame: - case MCFragment::FT_PseudoProbe: + case MCFragment::FT_PseudoProbe: return true; } } @@ -367,31 +367,31 @@ public: } }; -class MCNopsFragment : public MCFragment { - /// The number of bytes to insert. - int64_t Size; - /// Maximum number of bytes allowed in each NOP instruction. - int64_t ControlledNopLength; - - /// Source location of the directive that this fragment was created for. - SMLoc Loc; - -public: - MCNopsFragment(int64_t NumBytes, int64_t ControlledNopLength, SMLoc L, - MCSection *Sec = nullptr) - : MCFragment(FT_Nops, false, Sec), Size(NumBytes), - ControlledNopLength(ControlledNopLength), Loc(L) {} - - int64_t getNumBytes() const { return Size; } - int64_t getControlledNopLength() const { return ControlledNopLength; } - - SMLoc getLoc() const { return Loc; } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Nops; - } -}; - +class MCNopsFragment : public MCFragment { + /// The number of bytes to insert. + int64_t Size; + /// Maximum number of bytes allowed in each NOP instruction. + int64_t ControlledNopLength; + + /// Source location of the directive that this fragment was created for. + SMLoc Loc; + +public: + MCNopsFragment(int64_t NumBytes, int64_t ControlledNopLength, SMLoc L, + MCSection *Sec = nullptr) + : MCFragment(FT_Nops, false, Sec), Size(NumBytes), + ControlledNopLength(ControlledNopLength), Loc(L) {} + + int64_t getNumBytes() const { return Size; } + int64_t getControlledNopLength() const { return ControlledNopLength; } + + SMLoc getLoc() const { return Loc; } + + static bool classof(const MCFragment *F) { + return F->getKind() == MCFragment::FT_Nops; + } +}; + class MCOrgFragment : public MCFragment { /// Value to use for filling bytes. int8_t Value; @@ -600,23 +600,23 @@ public: return F->getKind() == MCFragment::FT_BoundaryAlign; } }; - -class MCPseudoProbeAddrFragment : public MCEncodedFragmentWithFixups<8, 1> { - /// The expression for the difference of the two symbols that - /// make up the address delta between two .pseudoprobe directives. - const MCExpr *AddrDelta; - -public: - MCPseudoProbeAddrFragment(const MCExpr *AddrDelta, MCSection *Sec = nullptr) - : MCEncodedFragmentWithFixups<8, 1>(FT_PseudoProbe, false, Sec), - AddrDelta(AddrDelta) {} - - const MCExpr &getAddrDelta() const { return *AddrDelta; } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_PseudoProbe; - } -}; + +class MCPseudoProbeAddrFragment : public MCEncodedFragmentWithFixups<8, 1> { + /// The expression for the difference of the two symbols that + /// make up the address delta between two .pseudoprobe directives. + const MCExpr *AddrDelta; + +public: + MCPseudoProbeAddrFragment(const MCExpr *AddrDelta, MCSection *Sec = nullptr) + : MCEncodedFragmentWithFixups<8, 1>(FT_PseudoProbe, false, Sec), + AddrDelta(AddrDelta) {} + + const MCExpr &getAddrDelta() const { return *AddrDelta; } + + static bool classof(const MCFragment *F) { + return F->getKind() == MCFragment::FT_PseudoProbe; + } +}; } // end namespace llvm #endif // LLVM_MC_MCFRAGMENT_H |