Skip to content

Commit 727ff71

Browse files
committed
Rename FunctionTest::getInvocation.
The test invocation is something completely different in this context.
1 parent 12ea579 commit 727ff71

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

include/swift/SIL/Test.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ class FunctionTest final {
167167
template <typename Analysis, typename Transform = SILFunctionTransform>
168168
Analysis *getAnalysis();
169169

170-
SwiftPassInvocation *getInvocation();
170+
SwiftPassInvocation *getSwiftPassInvocation();
171171

172172
//===----------------------------------------------------------------------===//
173173
//=== MARK: Implementation Details ===
@@ -247,7 +247,7 @@ class FunctionTest final {
247247
struct Dependencies {
248248
virtual DominanceInfo *getDominanceInfo() = 0;
249249
virtual SILPassManager *getPassManager() = 0;
250-
virtual SwiftPassInvocation *getInvocation() = 0;
250+
virtual SwiftPassInvocation *getSwiftPassInvocation() = 0;
251251
virtual ~Dependencies(){};
252252
};
253253

lib/SIL/Utils/Test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void FunctionTest::run(SILFunction &function, Arguments &arguments,
100100
llvm::outs().flush();
101101
auto *fn = invocation.get<NativeSwiftInvocation>();
102102
Registry::get().getFunctionTestThunk()(fn, {&function}, {&arguments},
103-
{getInvocation()});
103+
{getSwiftPassInvocation()});
104104
}
105105
this->pass = nullptr;
106106
this->function = nullptr;
@@ -115,6 +115,6 @@ SILPassManager *FunctionTest::getPassManager() {
115115
return dependencies->getPassManager();
116116
}
117117

118-
SwiftPassInvocation *FunctionTest::getInvocation() {
119-
return dependencies->getInvocation();
118+
SwiftPassInvocation *FunctionTest::getSwiftPassInvocation() {
119+
return dependencies->getSwiftPassInvocation();
120120
}

lib/SILOptimizer/UtilityPasses/TestRunner.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ class TestRunner : public SILFunctionTransform {
6060
: public test::FunctionTest::Dependencies {
6161
TestRunner *pass;
6262
SILFunction *function;
63-
SwiftPassInvocation invocation;
63+
SwiftPassInvocation swiftPassInvocation;
6464
FunctionTestDependenciesImpl(TestRunner *pass, SILFunction *function)
65-
: pass(pass), function(function), invocation(pass->getPassManager()) {}
65+
: pass(pass), function(function),
66+
swiftPassInvocation(pass->getPassManager()) {}
6667
DominanceInfo *getDominanceInfo() override {
6768
auto *dominanceAnalysis = pass->getAnalysis<DominanceAnalysis>();
6869
return dominanceAnalysis->get(function);
6970
}
70-
SwiftPassInvocation *getInvocation() override { return &invocation; }
71+
SwiftPassInvocation *getSwiftPassInvocation() override {
72+
return &swiftPassInvocation;
73+
}
7174
SILPassManager *getPassManager() override { return pass->getPassManager(); }
7275
~FunctionTestDependenciesImpl() {}
7376
};

0 commit comments

Comments
 (0)