| 214 | } |
| 215 | |
| 216 | bool CompileSourceFile::preprocess_() { |
| 217 | PreprocessFile::SpecialInstructions instructions( |
| 218 | PreprocessFile::SpecialInstructions::DontMute, |
| 219 | PreprocessFile::SpecialInstructions::DontMark, |
| 220 | m_commandLineParser->filterFileLine() |
| 221 | ? PreprocessFile::SpecialInstructions::Filter |
| 222 | : PreprocessFile::SpecialInstructions::DontFilter, |
| 223 | PreprocessFile::SpecialInstructions::CheckLoop, |
| 224 | PreprocessFile::SpecialInstructions::ComplainUndefinedMacro); |
| 225 | if (m_text.empty()) { |
| 226 | m_pp = new PreprocessFile(m_fileId, this, instructions, m_compilationUnit, |
| 227 | m_library); |
| 228 | } else { |
| 229 | m_pp = new PreprocessFile(BadSymbolId, this, instructions, |
| 230 | m_compilationUnit, m_library, |
| 231 | /* includer */ nullptr, /* includerLine */ 0, |
| 232 | m_text, nullptr, 0, BadPathId); |
| 233 | } |
| 234 | registerPP(m_pp); |
| 235 | |
| 236 | if (!m_pp->preprocess()) { |
| 237 | return false; |
| 238 | } |
| 239 | bool fatalErrors = m_errors->hasFatalErrors(); |
| 240 | if (fatalErrors) { |
| 241 | return false; |
| 242 | } |
| 243 | |
| 244 | if (m_commandLineParser->getDebugIncludeFileInfo()) |
| 245 | std::cerr << m_pp->reportIncludeInfo(); |
| 246 | |
| 247 | Precompiled* prec = Precompiled::getSingleton(); |
| 248 | if ((!m_commandLineParser->createCache()) && |
| 249 | prec->isFilePrecompiled(m_fileId, getSymbolTable())) |
| 250 | return true; |
| 251 | |
| 252 | m_pp->saveCache(); |
| 253 | return true; |
| 254 | } |
| 255 | |
| 256 | bool CompileSourceFile::postPreprocess_() { |
| 257 | FileSystem* const fileSystem = FileSystem::getInstance(); |
nothing calls this directly
no test coverage detected