Unique_ptrify Preprocessor::PragmaHandlersBackup

Follow up to r217656

llvm-svn: 217829
This commit is contained in:
David Blaikie 2014-09-15 21:31:42 +00:00
parent 6c42cb11d6
commit 9f0af9d862
2 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
/// \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.

View File

@ -183,7 +183,7 @@ void Preprocessor::InitializeForModelFile() {
NumEnteredSourceFiles = 0;
// Reset pragmas
PragmaHandlersBackup = PragmaHandlers.release();
PragmaHandlersBackup = std::move(PragmaHandlers);
PragmaHandlers = llvm::make_unique<PragmaNamespace>(StringRef());
RegisterBuiltinPragmas();
@ -194,7 +194,7 @@ void Preprocessor::InitializeForModelFile() {
void Preprocessor::FinalizeForModelFile() {
NumEnteredSourceFiles = 1;
PragmaHandlers.reset(PragmaHandlersBackup);
PragmaHandlers = std::move(PragmaHandlersBackup);
}
void Preprocessor::setPTHManager(PTHManager* pm) {