summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Basic/FileSystemStatCache.h4
-rw-r--r--clang/include/clang/Frontend/CompilerInstance.h10
-rw-r--r--clang/include/clang/Frontend/FrontendAction.h4
-rw-r--r--clang/include/clang/Lex/Preprocessor.h10
-rw-r--r--clang/include/clang/Serialization/ASTReader.h2
-rw-r--r--clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h2
6 files changed, 13 insertions, 19 deletions
diff --git a/clang/include/clang/Basic/FileSystemStatCache.h b/clang/include/clang/Basic/FileSystemStatCache.h
index 7ed0acc7a8c..05b65eede5b 100644
--- a/clang/include/clang/Basic/FileSystemStatCache.h
+++ b/clang/include/clang/Basic/FileSystemStatCache.h
@@ -82,8 +82,8 @@ public:
/// \brief Retrieve the next stat call cache in the chain, transferring
/// ownership of this cache (and, transitively, all of the remaining caches)
/// to the caller.
- FileSystemStatCache *takeNextStatCache() { return NextStatCache.take(); }
-
+ FileSystemStatCache *takeNextStatCache() { return NextStatCache.release(); }
+
protected:
virtual LookupResult getStat(const char *Path, FileData &Data, bool isFile,
vfs::File **F, vfs::FileSystem &FS) = 0;
diff --git a/clang/include/clang/Frontend/CompilerInstance.h b/clang/include/clang/Frontend/CompilerInstance.h
index 29627fa23d4..7c4d754bf9c 100644
--- a/clang/include/clang/Frontend/CompilerInstance.h
+++ b/clang/include/clang/Frontend/CompilerInstance.h
@@ -435,7 +435,7 @@ public:
/// takeASTConsumer - Remove the current AST consumer and give ownership to
/// the caller.
- ASTConsumer *takeASTConsumer() { return Consumer.take(); }
+ ASTConsumer *takeASTConsumer() { return Consumer.release(); }
/// setASTConsumer - Replace the current AST consumer; the compiler instance
/// takes ownership of \p Value.
@@ -450,9 +450,9 @@ public:
assert(TheSema && "Compiler instance has no Sema object!");
return *TheSema;
}
-
- Sema *takeSema() { return TheSema.take(); }
-
+
+ Sema *takeSema() { return TheSema.release(); }
+
/// }
/// @name Module Management
/// {
@@ -477,7 +477,7 @@ public:
/// takeCodeCompletionConsumer - Remove the current code completion consumer
/// and give ownership to the caller.
CodeCompleteConsumer *takeCodeCompletionConsumer() {
- return CompletionConsumer.take();
+ return CompletionConsumer.release();
}
/// setCodeCompletionConsumer - Replace the current code completion consumer;
diff --git a/clang/include/clang/Frontend/FrontendAction.h b/clang/include/clang/Frontend/FrontendAction.h
index a568ba02d2a..07b60c079d8 100644
--- a/clang/include/clang/Frontend/FrontendAction.h
+++ b/clang/include/clang/Frontend/FrontendAction.h
@@ -146,9 +146,7 @@ public:
return *CurrentASTUnit;
}
- ASTUnit *takeCurrentASTUnit() {
- return CurrentASTUnit.take();
- }
+ ASTUnit *takeCurrentASTUnit() { return CurrentASTUnit.release(); }
void setCurrentInput(const FrontendInputFile &CurrentInput, ASTUnit *AST = 0);
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h
index d01c4a1ff4c..e0cfc82c471 100644
--- a/clang/include/clang/Lex/Preprocessor.h
+++ b/clang/include/clang/Lex/Preprocessor.h
@@ -1326,13 +1326,9 @@ public:
private:
void PushIncludeMacroStack() {
- IncludeMacroStack.push_back(IncludeStackInfo(CurLexerKind,
- CurSubmodule,
- CurLexer.take(),
- CurPTHLexer.take(),
- CurPPLexer,
- CurTokenLexer.take(),
- CurDirLookup));
+ IncludeMacroStack.push_back(IncludeStackInfo(
+ CurLexerKind, CurSubmodule, CurLexer.release(), CurPTHLexer.release(),
+ CurPPLexer, CurTokenLexer.release(), CurDirLookup));
CurPPLexer = 0;
}
diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h
index f171eb93e54..2dc1d282757 100644
--- a/clang/include/clang/Serialization/ASTReader.h
+++ b/clang/include/clang/Serialization/ASTReader.h
@@ -1325,7 +1325,7 @@ public:
/// Takes ownership of \p L.
void addListener(ASTReaderListener *L) {
if (Listener)
- L = new ChainedASTReaderListener(L, Listener.take());
+ L = new ChainedASTReaderListener(L, Listener.release());
Listener.reset(L);
}
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
index a2e211edea8..e38fd88c152 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
@@ -120,7 +120,7 @@ public:
/// takeGraph - Returns the exploded graph. Ownership of the graph is
/// transferred to the caller.
- ExplodedGraph* takeGraph() { return G.take(); }
+ ExplodedGraph *takeGraph() { return G.release(); }
/// ExecuteWorkList - Run the worklist algorithm for a maximum number of
/// steps. Returns true if there is still simulation state on the worklist.
OpenPOWER on IntegriCloud