From: David Blaikie Date: Sun, 10 Aug 2014 20:12:39 +0000 (+0000) Subject: Out-of-line CompilerInstance::takeSema to avoid a header dependence from CompilerInst... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=42bd5fc71855a28e0221928a1b771e791c401d67;p=clang Out-of-line CompilerInstance::takeSema to avoid a header dependence from CompilerInstance.h on Sema.h Hopefully this fixes the libstdc++ build on some of the buildbots after r215321. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215325 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 7194057462..89397d3945 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -460,7 +460,7 @@ public: return *TheSema; } - std::unique_ptr takeSema() { return std::move(TheSema); } + std::unique_ptr takeSema(); void resetAndLeakSema() { BuryPointer(TheSema.release()); } /// } diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 6b8669e9a1..d8f4400f44 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -108,7 +108,11 @@ void CompilerInstance::setASTConsumer(std::unique_ptr Value) { void CompilerInstance::setCodeCompletionConsumer(CodeCompleteConsumer *Value) { CompletionConsumer.reset(Value); } - + +std::unique_ptr CompilerInstance::takeSema() { + return std::move(TheSema); +} + IntrusiveRefCntPtr CompilerInstance::getModuleManager() const { return ModuleManager; }