MCPcopy Create free account
hub / github.com/chipsalliance/Surelog / reportIncludeInfo

Method reportIncludeInfo

src/SourceCompile/PreprocessFile.cpp:659–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

657}
658
659std::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
676void PreprocessFile::recordMacro(std::string_view name, PathId fileId,
677 uint32_t startLine, uint16_t startColumn,

Callers 1

preprocess_Method · 0.80

Calls 1

toPathMethod · 0.80

Tested by

no test coverage detected