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

Method saveCache

src/SourceCompile/PreprocessFile.cpp:1289–1306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1287}
1288
1289void PreprocessFile::saveCache() {
1290 CommandLineParser* clp = getCompileSourceFile()->getCommandLineParser();
1291 if (clp->parseOnly() || clp->lowMem() || clp->link()) return;
1292 if (m_macroBody.empty()) {
1293 if (!m_usingCachedVersion) {
1294 PPCache cache(this);
1295 cache.save();
1296 }
1297 }
1298 // Disable cache saving for include files
1299 // If an include file is multiply included in a compilation unit with
1300 // different outcomes for the content of the file (GUARDING) The cache saved
1301 // is incorrect.
1302
1303 // for (PreprocessFile* include : m_includes) {
1304 // include->saveCache();
1305 // }
1306}
1307} // namespace SURELOG

Callers 1

preprocess_Method · 0.80

Calls 5

parseOnlyMethod · 0.80
lowMemMethod · 0.80
linkMethod · 0.80
getCommandLineParserMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected