Lines Matching refs:Preamble
86 /// \brief After failing to build a precompiled preamble (due to
87 /// errors in the source that occurs in the preamble), the number of
89 /// preamble.
814 // preamble. This will allow us to deserialize those top-level
934 // If the main file has been overridden due to the use of a preamble,
935 // make that override happen and introduce the preamble.
941 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
998 // Remove the overridden buffer we used for the preamble.
1008 /// \brief Simple function to retrieve a path for a preamble precompiled header.
1013 // FIXME: This is a hack so that we can override the preamble file during
1014 // crash-recovery testing, which is the only case where the preamble files
1034 P.appendComponent("preamble");
1042 /// \brief Compute the preamble for the main file, providing the source buffer
1044 /// that describes the preamble.
1132 /// \brief Attempt to build or re-use a precompiled preamble when (re-)parsing
1135 /// This routine will compute the preamble of the main source file. If a
1136 /// non-trivial preamble is found, it will precompile that preamble into a
1137 /// precompiled header so that the precompiled preamble can be used to reduce
1138 /// reparsing time. If a precompiled preamble has already been constructed,
1140 /// rebuilding the precompiled preamble.
1143 /// allowed to rebuild the precompiled preamble if it is found to be
1147 /// can occur within the preamble.
1149 /// \returns If the precompiled preamble can be used, returns a newly-allocated
1167 // If ComputePreamble() Take ownership of the preamble buffer.
1173 // We couldn't find a preamble in the main source. Clear out the current
1174 // preamble, if we have one. It's obviously no good any more.
1175 Preamble.clear();
1181 // The next time we actually see a preamble, precompile it.
1186 if (!Preamble.empty()) {
1187 // We've previously computed a preamble. Check whether we have the same
1188 // preamble now that we did before, and that there's enough space in
1189 // the main-file buffer within the precompiled preamble to fit the
1191 if (Preamble.size() == NewPreamble.second.first &&
1194 memcmp(Preamble.getBufferStart(), NewPreamble.first->getBufferStart(),
1196 // The preamble has not changed. We may be able to re-use the precompiled
1197 // preamble.
1199 // Check that none of the files used by the preamble have changed.
1258 // Okay! We can re-use the precompiled preamble.
1261 // after parsing the preamble.
1263 // have occurred in the preamble.
1270 // buffer size we reserved when creating the preamble.
1277 // If we aren't allowed to rebuild the precompiled preamble, just
1282 // We can't reuse the previously-computed preamble. Build a new one.
1283 Preamble.clear();
1288 // We aren't allowed to rebuild the precompiled preamble; just
1293 // If the preamble rebuild counter > 1, it's because we previously
1294 // failed to build a preamble and we're not yet ready to try
1301 // Create a temporary file for the precompiled preamble. In rare
1310 // We did not previously compute a preamble, or it can't be reused anyway.
1312 PreambleTimer.setOutput("Precompiling preamble");
1314 // Create a new buffer that stores the preamble. The buffer also contains
1324 // Save the preamble text for later; we'll need to compare against it for
1327 Preamble.assign(FileMgr->getFile(MainFilename),
1338 NewPreamble.first->getBufferStart(), Preamble.size());
1339 memset(const_cast<char*>(PreambleBuffer->getBufferStart()) + Preamble.size(),
1340 ' ', PreambleReservedSize - Preamble.size() - 1);
1343 // Remap the main source file to the preamble buffer.
1354 // Create the compiler instance to use for building the precompiled preamble.
1373 Preamble.clear();
1414 Preamble.clear();
1425 // There were errors parsing the preamble, so no precompiled header was
1429 Preamble.clear();
1437 // Transfer any diagnostics generated when parsing the preamble into the set
1438 // of preamble diagnostics.
1447 // Keep track of the preamble we precompiled.
1474 // entities the last time we rebuilt the preamble, clear out the completion
1808 // If we have a preamble file lying around, or if we might try to
1809 // build a precompiled preamble, do so now.
2177 // If we have a precompiled preamble, try to use it. We only allow
2178 // the use of the precompiled preamble if we're if the completion
2180 // preamble.
2195 // If the main file has been overridden due to the use of a preamble,
2196 // make that override happen and introduce the preamble.
2203 PreprocessorOpts.PrecompiledPreambleBytes.first = Preamble.size();
2307 assert(Mod && "Don't have preamble module");
2364 /// \brief If \arg Loc is a loaded location from the preamble, returns
2372 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2376 if (SourceMgr->isInFileID(Loc, PreambleID, &Offs) && Offs < Preamble.size()) {
2386 /// preamble chunk, returns the corresponding loaded location from the
2387 /// preamble, otherwise it returns \arg Loc.
2393 if (Loc.isInvalid() || Preamble.empty() || PreambleID.isInvalid())
2398 Offs < Preamble.size()) {