Home | History | Annotate | Download | only in Frontend

Lines Matching refs: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.
204 /// \brief After failing to build a precompiled preamble (due to
205 /// errors in the source that occurs in the preamble), the number of
207 /// preamble.
242 // Clean up the temporary files and the preamble file.
965 // preamble. This will allow us to deserialize those top-level
1114 // If the main file has been overridden due to the use of a preamble,
1115 // make that override happen and introduce the preamble.
1119 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
1164 // Remove the overridden buffer we used for the preamble.
1179 /// \brief Simple function to retrieve a path for a preamble precompiled header.
1181 // FIXME: This is a hack so that we can override the preamble file during
1182 // crash-recovery testing, which is the only case where the preamble files
1189 llvm::sys::fs::createTemporaryFile("preamble", "pch", Path);
1194 /// \brief Compute the preamble for the main file, providing the source buffer
1196 /// that describes the preamble.
1341 /// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
1344 /// This routine will compute the preamble of the main source file. If a
1345 /// non-trivial preamble is found, it will precompile that preamble into a
1346 /// precompiled header so that the precompiled preamble can be used to reduce
1347 /// reparsing time. If a precompiled preamble has already been constructed,
1349 /// rebuilding the precompiled preamble.
1352 /// allowed to rebuild the precompiled preamble if it is found to be
1356 /// can occur within the preamble.
1358 /// \returns If the precompiled preamble can be used, returns a newly-allocated
1376 // If ComputePreamble() Take ownership of the preamble buffer.
1382 // We couldn't find a preamble in the main source. Clear out the current
1383 // preamble, if we have one. It's obviously no good any more.
1384 Preamble.clear();
1387 // The next time we actually see a preamble, precompile it.
1392 if (!Preamble.empty()) {
1393 // We've previously computed a preamble. Check whether we have the same
1394 // preamble now that we did before, and that there's enough space in
1395 // the main-file buffer within the precompiled preamble to fit the
1397 if (Preamble.size() == NewPreamble.second.first &&
1399 memcmp(Preamble.getBufferStart(), NewPreamble.first->getBufferStart(),
1401 // The preamble has not changed. We may be able to re-use the precompiled
1402 // preamble.
1404 // Check that none of the files used by the preamble have changed.
1460 // Okay! We can re-use the precompiled preamble.
1463 // after parsing the preamble.
1474 // If we aren't allowed to rebuild the precompiled preamble, just
1479 // We can't reuse the previously-computed preamble. Build a new one.
1480 Preamble.clear();
1485 // We aren't allowed to rebuild the precompiled preamble; just
1490 // If the preamble rebuild counter > 1, it's because we previously
1491 // failed to build a preamble and we're not yet ready to try
1498 // Create a temporary file for the precompiled preamble. In rare
1507 // We did not previously compute a preamble, or it can't be reused anyway.
1509 PreambleTimer.setOutput("Precompiling preamble");
1511 // Save the preamble text for later; we'll need to compare against it for
1514 Preamble.assign(FileMgr->getFile(MainFilename),
1523 NewPreamble.first->getBuffer().slice(0, Preamble.size()), MainFilename);
1525 // Remap the main source file to the preamble buffer.
1536 // Create the compiler instance to use for building the precompiled preamble.
1554 Preamble.clear();
1600 Preamble.clear();
1608 // Transfer any diagnostics generated when parsing the preamble into the set
1609 // of preamble diagnostics.
1623 // The preamble PCH failed (e.g. there was a module loading fatal error),
1627 Preamble.clear();
1634 // Keep track of the preamble we precompiled.
1660 // entities the last time we rebuilt the preamble, clear out the completion
2063 // If we have a preamble file lying around, or if we might try to
2064 // build a precompiled preamble, do so now.
2426 // If we have a precompiled preamble, try to use it. We only allow
2427 // the use of the precompiled preamble if we're if the completion
2429 // preamble.
2447 // If the main file has been overridden due to the use of a preamble,
2448 // make that override happen and introduce the preamble.
2451 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
2689 /// \brief If \arg Loc is a loaded location from the preamble, returns
2697 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2701 if (SourceMgr->isInFileID(Loc, PreambleID, &Offs) && Offs < Preamble.size()) {
2711 /// preamble chunk, returns the corresponding loaded location from the
2712 /// preamble, otherwise it returns \arg Loc.
2718 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2723 Offs < Preamble.size()) {