X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FDebugInfo%2FDWARFDebugLine.h;h=bc6a70b1112040af6bbe444594d3131f99cebbb6;hb=92ec8e1427e595d540f2238c7a1bb05fbd013013;hp=6c3946f4c0679ca8beceec377e76acac3a21c598;hpb=b848e976110a2c4f0a6a9e252115ba291c844fbe;p=oota-llvm.git diff --git a/lib/DebugInfo/DWARFDebugLine.h b/lib/DebugInfo/DWARFDebugLine.h index 6c3946f4c06..bc6a70b1112 100644 --- a/lib/DebugInfo/DWARFDebugLine.h +++ b/lib/DebugInfo/DWARFDebugLine.h @@ -79,7 +79,6 @@ public: IncludeDirectories.clear(); FileNames.clear(); } - bool getFile(uint32_t file_idx, std::string& file, std::string& dir) const; }; // Standard .debug_line state machine structure. @@ -148,7 +147,8 @@ public: DoneParsingLineTable = -1 }; - State() : row(0) {} + State() : row(StartParsingLineTable) {} + virtual ~State(); virtual void appendRowToMatrix(uint32_t offset); virtual void finalize(uint32_t offset) { row = DoneParsingLineTable; } @@ -161,6 +161,7 @@ public: struct DumpingState : public State { DumpingState(raw_ostream &OS) : OS(OS) {} + virtual ~DumpingState(); virtual void finalize(uint32_t offset); private: raw_ostream &OS; @@ -172,17 +173,11 @@ public: static bool parseStatementTable(DataExtractor debug_line_data, uint32_t *offset_ptr, State &state); - /// Parse all information in the debug_line_data into an internal - /// representation. - void parse(DataExtractor debug_line_data); - void parseIfNeeded(DataExtractor debug_line_data) { - if (LineTableMap.empty()) - parse(debug_line_data); - } - static void dump(DataExtractor debug_line_data, raw_ostream &OS); const LineTable *getLineTable(uint32_t offset) const; + const LineTable *getOrParseLineTable(DataExtractor debug_line_data, + uint32_t offset); -protected: +private: typedef std::map LineTableMapTy; typedef LineTableMapTy::iterator LineTableIter; typedef LineTableMapTy::const_iterator LineTableConstIter;