| 657 | } |
| 658 | |
| 659 | std::string PreprocessFile::reportIncludeInfo() const { |
| 660 | FileSystem* const fileSystem = FileSystem::getInstance(); |
| 661 | std::ostringstream strm; |
| 662 | for (auto const& info : m_includeFileInfo) { |
| 663 | const char* const context = |
| 664 | (info.m_context == IncludeFileInfo::Context::INCLUDE) ? "inc" : "mac"; |
| 665 | const char* const action = |
| 666 | (info.m_action == IncludeFileInfo::Action::PUSH) ? "in" : "out"; |
| 667 | strm << context << " " << info.m_originalStartLine << "," |
| 668 | << info.m_originalStartColumn << ":" << info.m_originalEndLine << "," |
| 669 | << info.m_originalEndColumn << " " << getSymbol(info.m_sectionSymbolId) |
| 670 | << "^" << fileSystem->toPath(info.m_sectionFileId) << " " |
| 671 | << info.m_sectionStartLine << " " << action << std::endl; |
| 672 | } |
| 673 | return strm.str(); |
| 674 | } |
| 675 | |
| 676 | void PreprocessFile::recordMacro(std::string_view name, PathId fileId, |
| 677 | uint32_t startLine, uint16_t startColumn, |