Home | History | Annotate | Download | only in Frontend

Lines Matching refs:Preamble

88     /// \brief The file in which the precompiled preamble is stored.
98 /// \brief Erase the preamble file.
101 /// \brief Erase temporary files and the preamble file.
203 /// \brief After failing to build a precompiled preamble (due to
204 /// errors in the source that occurs in the preamble), the number of
206 /// preamble.
236 // Clean up the temporary files and the preamble file.
954 // preamble. This will allow us to deserialize those top-level
1103 // If the main file has been overridden due to the use of a preamble,
1104 // make that override happen and introduce the preamble.
1108 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
1153 // Remove the overridden buffer we used for the preamble.
1168 /// \brief Simple function to retrieve a path for a preamble precompiled header.
1173 // FIXME: This is a hack so that we can override the preamble file during
1174 // crash-recovery testing, which is the only case where the preamble files
1194 P.appendComponent("preamble");
1202 /// \brief Compute the preamble for the main file, providing the source buffer
1204 /// that describes the preamble.
1292 /// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
1295 /// This routine will compute the preamble of the main source file. If a
1296 /// non-trivial preamble is found, it will precompile that preamble into a
1297 /// precompiled header so that the precompiled preamble can be used to reduce
1298 /// reparsing time. If a precompiled preamble has already been constructed,
1300 /// rebuilding the precompiled preamble.
1303 /// allowed to rebuild the precompiled preamble if it is found to be
1307 /// can occur within the preamble.
1309 /// \returns If the precompiled preamble can be used, returns a newly-allocated
1327 // If ComputePreamble() Take ownership of the preamble buffer.
1333 // We couldn't find a preamble in the main source. Clear out the current
1334 // preamble, if we have one. It's obviously no good any more.
1335 Preamble.clear();
1338 // The next time we actually see a preamble, precompile it.
1343 if (!Preamble.empty()) {
1344 // We've previously computed a preamble. Check whether we have the same
1345 // preamble now that we did before, and that there's enough space in
1346 // the main-file buffer within the precompiled preamble to fit the
1348 if (Preamble.size() == NewPreamble.second.first &&
1351 memcmp(Preamble.getBufferStart(), NewPreamble.first->getBufferStart(),
1353 // The preamble has not changed. We may be able to re-use the precompiled
1354 // preamble.
1356 // Check that none of the files used by the preamble have changed.
1415 // Okay! We can re-use the precompiled preamble.
1418 // after parsing the preamble.
1425 // buffer size we reserved when creating the preamble.
1432 // If we aren't allowed to rebuild the precompiled preamble, just
1437 // We can't reuse the previously-computed preamble. Build a new one.
1438 Preamble.clear();
1443 // We aren't allowed to rebuild the precompiled preamble; just
1448 // If the preamble rebuild counter > 1, it's because we previously
1449 // failed to build a preamble and we're not yet ready to try
1456 // Create a temporary file for the precompiled preamble. In rare
1465 // We did not previously compute a preamble, or it can't be reused anyway.
1467 PreambleTimer.setOutput("Precompiling preamble");
1469 // Create a new buffer that stores the preamble. The buffer also contains
1479 // Save the preamble text for later; we'll need to compare against it for
1482 Preamble.assign(FileMgr->getFile(MainFilename),
1493 NewPreamble.first->getBufferStart(), Preamble.size());
1494 memset(const_cast<char*>(PreambleBuffer->getBufferStart()) + Preamble.size(),
1495 ' ', PreambleReservedSize - Preamble.size() - 1);
1498 // Remap the main source file to the preamble buffer.
1509 // Create the compiler instance to use for building the precompiled preamble.
1528 Preamble.clear();
1566 Preamble.clear();
1577 // There were errors parsing the preamble, so no precompiled header was
1581 Preamble.clear();
1589 // Transfer any diagnostics generated when parsing the preamble into the set
1590 // of preamble diagnostics.
1596 // Keep track of the preamble we precompiled.
1623 // entities the last time we rebuilt the preamble, clear out the completion
2000 // If we have a preamble file lying around, or if we might try to
2001 // build a precompiled preamble, do so now.
2375 // If we have a precompiled preamble, try to use it. We only allow
2376 // the use of the precompiled preamble if we're if the completion
2378 // preamble.
2393 // If the main file has been overridden due to the use of a preamble,
2394 // make that override happen and introduce the preamble.
2401 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
2504 assert(Mod && "Don't have preamble module");
2650 /// \brief If \arg Loc is a loaded location from the preamble, returns
2658 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2662 if (SourceMgr->isInFileID(Loc, PreambleID, &Offs) && Offs < Preamble.size()) {
2672 /// preamble chunk, returns the corresponding loaded location from the
2673 /// preamble, otherwise it returns \arg Loc.
2679 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2684 Offs < Preamble.size()) {