unique_ptr-ify CompilerInstance::takeSema

llvm-svn: 215321
This commit is contained in:
David Blaikie 2014-08-10 19:14:48 +00:00
parent 6f7382ddd1
commit ec99b5ee0d
2 changed files with 2 additions and 2 deletions

View File

@ -459,7 +459,7 @@ public:
return *TheSema;
}
Sema *takeSema() { return TheSema.release(); }
std::unique_ptr<Sema> takeSema() { return std::move(TheSema); }
void resetAndLeakSema() { BuryPointer(TheSema.release()); }
/// }

View File

@ -1684,7 +1684,7 @@ void ASTUnit::transferASTDataFromCompilerInstance(CompilerInstance &CI) {
// created.
assert(CI.hasInvocation() && "missing invocation");
LangOpts = CI.getInvocation().LangOpts;
TheSema.reset(CI.takeSema());
TheSema = CI.takeSema();
Consumer.reset(CI.takeASTConsumer());
if (CI.hasASTContext())
Ctx = &CI.getASTContext();