diff options
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/MC/MCELFStreamer.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/MC/MCStreamer.h | 19 | ||||
| -rw-r--r-- | llvm/include/llvm/Support/Dwarf.h | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/llvm/include/llvm/MC/MCELFStreamer.h b/llvm/include/llvm/MC/MCELFStreamer.h index bff0cbad5bf..76369ccb231 100644 --- a/llvm/include/llvm/MC/MCELFStreamer.h +++ b/llvm/include/llvm/MC/MCELFStreamer.h @@ -85,6 +85,8 @@ public: virtual void EmitValueToAlignment(unsigned, int64_t, unsigned, unsigned); + virtual void Flush(); + virtual void FinishImpl(); /// @} diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index cd297a4d9da..8cb5c493237 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -86,6 +86,10 @@ private: MCSymbol *LastSymbol; + // SymbolOrdering - Tracks an index to represent the order + // a symbol was emitted in. Zero means we did not emit that symbol. + DenseMap<const MCSymbol *, unsigned> SymbolOrdering; + /// SectionStack - This is stack of current and previous section /// values saved by PushSection. SmallVector<std::pair<MCSectionSubPair, MCSectionSubPair>, 4> SectionStack; @@ -185,6 +189,12 @@ public: return MCSectionSubPair(); } + /// GetSymbolOrder - Returns an index to represent the order + /// a symbol was emitted in. (zero if we did not emit that symbol) + unsigned GetSymbolOrder(const MCSymbol *Sym) const { + return SymbolOrdering.lookup(Sym); + } + /// ChangeSection - Update streamer for a new active section. /// /// This is called by PopSection and SwitchSection, if the current @@ -264,6 +274,12 @@ public: /// InitToTextSection - Create a text section and switch the streamer to it. virtual void InitToTextSection() = 0; + /// AssignSection - Sets the symbol's section. + /// + /// Each emitted symbol will be tracked in the ordering table, + /// so we can sort on them later. + void AssignSection(MCSymbol *Symbol, const MCSection *Section); + /// EmitLabel - Emit a label for @p Symbol into the current section. /// /// This corresponds to an assembler statement such as: @@ -620,6 +636,9 @@ public: /// these methods there. virtual void EmitTCEntry(const MCSymbol &S); + /// Flush - Causes any cached state to be written out. + virtual void Flush() {} + /// FinishImpl - Streamer specific finalization. virtual void FinishImpl() = 0; /// Finish - Finish emission of machine code. diff --git a/llvm/include/llvm/Support/Dwarf.h b/llvm/include/llvm/Support/Dwarf.h index 7b87c6a90d0..d924788057e 100644 --- a/llvm/include/llvm/Support/Dwarf.h +++ b/llvm/include/llvm/Support/Dwarf.h @@ -59,7 +59,8 @@ enum LLVMConstants { DWARF_VERSION = 4, // Default dwarf version we output. DW_CIE_VERSION = 1, // Common frame information version. DW_PUBTYPES_VERSION = 2, // Section version number for .debug_pubtypes. - DW_PUBNAMES_VERSION = 2 // Section version number for .debug_pubnames. + DW_PUBNAMES_VERSION = 2, // Section version number for .debug_pubnames. + DW_ARANGES_VERSION = 2 // Section version number for .debug_aranges. }; // Special ID values that distinguish a CIE from a FDE in DWARF CFI. |

