Skip to content

Commit cad0761

Browse files
committed
[Test] Expose current pass.
Some clients need to access their parent transformation.
1 parent 73ed03c commit cad0761

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/SIL/Test.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ class FunctionTest final {
173173
template <typename Analysis, typename Transform = SILFunctionTransform>
174174
Analysis *getAnalysis();
175175

176+
SILFunctionTransform *getPass();
177+
176178
SwiftPassInvocation *getSwiftPassInvocation();
177179

178180
//===----------------------------------------------------------------------===//
@@ -302,6 +304,8 @@ template <typename Analysis, typename Transform>
302304
Analysis *FunctionTest::getAnalysis() {
303305
return impl::getAnalysisFromTransform<Analysis, Transform>(pass);
304306
}
307+
308+
inline SILFunctionTransform *FunctionTest::getPass() { return pass; }
305309
} // namespace test
306310
} // namespace swift
307311

0 commit comments

Comments
 (0)