Skip to content

Commit f2466de

Browse files
committed
[CodeCompletion] Rename getReusingCompilerInstance()
to getCachedCompilerInstance()
1 parent 204ae49 commit f2466de

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

include/swift/IDE/CompletionInstance.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class CompletionInstance {
4747
/// changed, primary file is not the same, the \c Offset is not in function
4848
/// bodies, or the interface hash of the file has changed.
4949
swift::CompilerInstance *
50-
getReusingCompilerInstance(const swift::CompilerInvocation &Invocation,
51-
llvm::MemoryBuffer *completionBuffer,
52-
unsigned int Offset, DiagnosticConsumer *DiagC);
50+
getCachedCompilerInstance(const swift::CompilerInvocation &Invocation,
51+
llvm::MemoryBuffer *completionBuffer,
52+
unsigned int Offset, DiagnosticConsumer *DiagC);
5353

5454
/// Returns new \c CompilerInstance for the completion request. Users still
5555
/// have to call \c performParseAndResolveImportsOnly() , and perform the

lib/IDE/CompletionInstance.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static llvm::hash_code calculateInvocationHash(const CompilerInvocation &Inv) {
195195

196196
} // namespace
197197

198-
CompilerInstance *CompletionInstance::getReusingCompilerInstance(
198+
CompilerInstance *CompletionInstance::getCachedCompilerInstance(
199199
const swift::CompilerInvocation &Invocation,
200200
llvm::MemoryBuffer *completionBuffer, unsigned int Offset,
201201
DiagnosticConsumer *DiagC) {
@@ -348,8 +348,8 @@ CompilerInstance *swift::ide::CompletionInstance::getCompilerInstance(
348348
// FIXME: ASTScopeLookup doesn't support code completion yet.
349349
Invocation.disableASTScopeLookup();
350350

351-
if (auto *cached = getReusingCompilerInstance(Invocation, completionBuffer,
352-
Offset, DiagC))
351+
if (auto *cached = getCachedCompilerInstance(Invocation, completionBuffer,
352+
Offset, DiagC))
353353
return cached;
354354

355355
if (auto *renewed = renewCompilerInstance(

0 commit comments

Comments
 (0)