forked from OSchip/llvm-project
Unique_ptrify Preprocessor::PragmaHandlersBackup
Follow up to r217656 llvm-svn: 217829
This commit is contained in:
parent
6c42cb11d6
commit
9f0af9d862
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue