diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-19 09:28:59 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-19 09:28:59 +0000 |
commit | 53b2338a1d061ad15a858ff0d641431f4d4ac101 (patch) | |
tree | ccd340b12bd98488abf7a6887544f15207fc7930 /include/llvm/MC/MCAssembler.h | |
parent | bdd9281f356d326155dc2ca5585a708e09e90600 (diff) | |
download | external_llvm-53b2338a1d061ad15a858ff0d641431f4d4ac101.zip external_llvm-53b2338a1d061ad15a858ff0d641431f4d4ac101.tar.gz external_llvm-53b2338a1d061ad15a858ff0d641431f4d4ac101.tar.bz2 |
MC: Split MCObjectWriter out of MCAssembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 1c21bba..41e7515 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -26,6 +26,7 @@ class MCAssembler; class MCContext; class MCExpr; class MCFragment; +class MCObjectWriter; class MCSection; class MCSectionData; class MCSymbol; @@ -618,6 +619,23 @@ private: unsigned SubsectionsViaSymbols : 1; private: + /// Evaluate a fixup to a relocatable expression and the value which should be + /// placed into the fixup. + /// + /// \param Layout The layout to use for evaluation. + /// \param Fixup The fixup to evaluate. + /// \param DF The fragment the fixup is inside. + /// \param Target [out] On return, the relocatable expression the fixup + /// evaluates to. + /// \param Value [out] On return, the value of the fixup as currently layed + /// out. + /// \return Whether the fixup value was fully resolved. This is true if the + /// \arg Value result is fixed, otherwise the value may change due to + /// relocation. + bool EvaluateFixup(const MCAsmLayout &Layout, + MCAsmFixup &Fixup, MCDataFragment *DF, + MCValue &Target, uint64_t &Value) const; + /// Check whether a fixup can be satisfied, or whether it needs to be relaxed /// (increased in size, in order to hold its value correctly). bool FixupNeedsRelaxation(MCAsmFixup &Fixup, MCDataFragment *DF); @@ -631,7 +649,6 @@ private: /// were adjusted. bool LayoutOnce(); - // FIXME: Make protected once we factor out object writer classes. public: /// Find the symbol which defines the atom containing given address, inside /// the given section, or null if there is no such symbol. @@ -652,22 +669,10 @@ public: /// defining a separate atom. bool isSymbolLinkerVisible(const MCSymbolData *SD) const; - /// Evaluate a fixup to a relocatable expression and the value which should be - /// placed into the fixup. - /// - /// \param Layout The layout to use for evaluation. - /// \param Fixup The fixup to evaluate. - /// \param DF The fragment the fixup is inside. - /// \param Target [out] On return, the relocatable expression the fixup - /// evaluates to. - /// \param Value [out] On return, the value of the fixup as currently layed - /// out. - /// \return Whether the fixup value was fully resolved. This is true if the - /// \arg Value result is fixed, otherwise the value may change due to - /// relocation. - bool EvaluateFixup(const MCAsmLayout &Layout, - MCAsmFixup &Fixup, MCDataFragment *DF, - MCValue &Target, uint64_t &Value) const; + /// Emit the section contents using the given object writer. + // + // FIXME: Should MCAssembler always have a reference to the object writer? + void WriteSectionData(const MCSectionData *Section, MCObjectWriter *OW) const; public: /// Construct a new assembler instance. |