| 1227 | } |
| 1228 | |
| 1229 | uint32_t PreprocessFile::getLineNb(uint32_t line) { |
| 1230 | if (isMacroBody() && m_macroInfo) { |
| 1231 | return (m_macroInfo->m_startLine + line - 1); |
| 1232 | } else if (!m_lineTranslationVec.empty()) { |
| 1233 | uint32_t index = m_lineTranslationVec.size() - 1; |
| 1234 | while (true) { |
| 1235 | if (line >= m_lineTranslationVec[index].m_originalLine) { |
| 1236 | return (m_lineTranslationVec[index].m_pretendLine + |
| 1237 | (line - m_lineTranslationVec[index].m_originalLine)); |
| 1238 | } |
| 1239 | if (index == 0) break; |
| 1240 | index--; |
| 1241 | } |
| 1242 | } |
| 1243 | return line; |
| 1244 | } |
| 1245 | |
| 1246 | std::string PreprocessFile::getPreProcessedFileContent() { |
| 1247 | FileSystem* const fileSystem = FileSystem::getInstance(); |