Lines Matching full:preamble
83 /// \brief The file in which the precompiled preamble is stored.
93 /// \brief Erase the preamble file.
96 /// \brief Erase temporary files and the preamble file.
207 /// \brief After failing to build a precompiled preamble (due to
208 /// errors in the source that occurs in the preamble), the number of
210 /// preamble.
241 // Clean up the temporary files and the preamble file.
988 // preamble. This will allow us to deserialize those top-level
1137 // If the main file has been overridden due to the use of a preamble,
1138 // make that override happen and introduce the preamble.
1142 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
1188 // Remove the overridden buffer we used for the preamble.
1203 /// \brief Simple function to retrieve a path for a preamble precompiled header.
1208 // FIXME: This is a hack so that we can override the preamble file during
1209 // crash-recovery testing, which is the only case where the preamble files
1229 P.appendComponent("preamble");
1237 /// \brief Compute the preamble for the main file, providing the source buffer
1239 /// that describes the preamble.
1327 /// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
1330 /// This routine will compute the preamble of the main source file. If a
1331 /// non-trivial preamble is found, it will precompile that preamble into a
1332 /// precompiled header so that the precompiled preamble can be used to reduce
1333 /// reparsing time. If a precompiled preamble has already been constructed,
1335 /// rebuilding the precompiled preamble.
1338 /// allowed to rebuild the precompiled preamble if it is found to be
1342 /// can occur within the preamble.
1344 /// \returns If the precompiled preamble can be used, returns a newly-allocated
1362 // If ComputePreamble() Take ownership of the preamble buffer.
1368 // We couldn't find a preamble in the main source. Clear out the current
1369 // preamble, if we have one. It's obviously no good any more.
1370 Preamble.clear();
1373 // The next time we actually see a preamble, precompile it.
1378 if (!Preamble.empty()) {
1379 // We've previously computed a preamble. Check whether we have the same
1380 // preamble now that we did before, and that there's enough space in
1381 // the main-file buffer within the precompiled preamble to fit the
1383 if (Preamble.size() == NewPreamble.second.first &&
1386 memcmp(Preamble.getBufferStart(), NewPreamble.first->getBufferStart(),
1388 // The preamble has not changed. We may be able to re-use the precompiled
1389 // preamble.
1391 // Check that none of the files used by the preamble have changed.
1450 // Okay! We can re-use the precompiled preamble.
1453 // after parsing the preamble.
1460 // buffer size we reserved when creating the preamble.
1467 // If we aren't allowed to rebuild the precompiled preamble, just
1472 // We can't reuse the previously-computed preamble. Build a new one.
1473 Preamble.clear();
1478 // We aren't allowed to rebuild the precompiled preamble; just
1483 // If the preamble rebuild counter > 1, it's because we previously
1484 // failed to build a preamble and we're not yet ready to try
1491 // Create a temporary file for the precompiled preamble. In rare
1500 // We did not previously compute a preamble, or it can't be reused anyway.
1502 PreambleTimer.setOutput("Precompiling preamble");
1504 // Create a new buffer that stores the preamble. The buffer also contains
1514 // Save the preamble text for later; we'll need to compare against it for
1517 Preamble.assign(FileMgr->getFile(MainFilename),
1528 NewPreamble.first->getBufferStart(), Preamble.size());
1529 memset(const_cast<char*>(PreambleBuffer->getBufferStart()) + Preamble.size(),
1530 ' ', PreambleReservedSize - Preamble.size() - 1);
1533 // Remap the main source file to the preamble buffer.
1544 // Create the compiler instance to use for building the precompiled preamble.
1562 Preamble.clear();
1600 Preamble.clear();
1611 // There were errors parsing the preamble, so no precompiled header was
1615 Preamble.clear();
1623 // Transfer any diagnostics generated when parsing the preamble into the set
1624 // of preamble diagnostics.
1630 // Keep track of the preamble we precompiled.
1657 // entities the last time we rebuilt the preamble, clear out the completion
2075 // If we have a preamble file lying around, or if we might try to
2076 // build a precompiled preamble, do so now.
2446 // If we have a precompiled preamble, try to use it. We only allow
2447 // the use of the precompiled preamble if we're if the completion
2449 // preamble.
2464 // If the main file has been overridden due to the use of a preamble,
2465 // make that override happen and introduce the preamble.
2468 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
2575 assert(Mod && "Don't have preamble module");
2721 /// \brief If \arg Loc is a loaded location from the preamble, returns
2729 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2733 if (SourceMgr->isInFileID(Loc, PreambleID, &Offs) && Offs < Preamble.size()) {
2743 /// preamble chunk, returns the corresponding loaded location from the
2744 /// preamble, otherwise it returns \arg Loc.
2750 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2755 Offs < Preamble.size()) {