/// \brief Pragma handlers of the original source is stored here during the
/// parsing of a model file.
- PragmaNamespace *PragmaHandlersBackup;
+ std::unique_ptr<PragmaNamespace> PragmaHandlersBackup;
/// \brief Tracks all of the comment handlers that the client registered
/// with this preprocessor.
NumEnteredSourceFiles = 0;
// Reset pragmas
- PragmaHandlersBackup = PragmaHandlers.release();
+ PragmaHandlersBackup = std::move(PragmaHandlers);
PragmaHandlers = llvm::make_unique<PragmaNamespace>(StringRef());
RegisterBuiltinPragmas();
void Preprocessor::FinalizeForModelFile() {
NumEnteredSourceFiles = 1;
- PragmaHandlers.reset(PragmaHandlersBackup);
+ PragmaHandlers = std::move(PragmaHandlersBackup);
}
void Preprocessor::setPTHManager(PTHManager* pm) {