forked from OSchip/llvm-project
unique_ptr-ify CompilerInstance::takeSema
llvm-svn: 215321
This commit is contained in:
parent
6f7382ddd1
commit
ec99b5ee0d
|
@ -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()); }
|
||||
|
||||
/// }
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue