File tree Expand file tree Collapse file tree 2 files changed +18
-15
lines changed
SILOptimizer/UtilityPasses Expand file tree Collapse file tree 2 files changed +18
-15
lines changed Original file line number Diff line number Diff line change 17
17
#include " swift/SIL/SILInstruction.h"
18
18
#include " swift/SIL/SILModule.h"
19
19
#include " swift/SIL/SILVisitor.h"
20
+ #include " swift/SIL/Test.h"
20
21
#include " llvm/ADT/StringSwitch.h"
21
22
22
23
using namespace swift ;
@@ -154,6 +155,23 @@ bool ValueBase::isLexical() const {
154
155
return false ;
155
156
}
156
157
158
+ namespace swift ::test {
159
+ // Arguments:
160
+ // - value
161
+ // Dumps:
162
+ // - value
163
+ // - whether it's lexical
164
+ static FunctionTest IsLexicalTest (" is-lexical" , [](auto &function,
165
+ auto &arguments,
166
+ auto &test) {
167
+ auto value = arguments.takeValue ();
168
+ auto isLexical = value->isLexical ();
169
+ value->dump ();
170
+ auto *boolString = isLexical ? " true" : " false" ;
171
+ llvm::errs () << boolString << " \n " ;
172
+ });
173
+ } // end namespace swift::test
174
+
157
175
bool ValueBase::isGuaranteedForwarding () const {
158
176
if (getOwnershipKind () != OwnershipKind::Guaranteed) {
159
177
return false ;
Original file line number Diff line number Diff line change @@ -311,21 +311,6 @@ static FunctionTest FieldSensitiveMultiDefUseLiveRangeTest(
311
311
boundary.print (llvm::errs ());
312
312
});
313
313
314
- // Arguments:
315
- // - value
316
- // Dumps:
317
- // - value
318
- // - whether it's lexical
319
- static FunctionTest IsLexicalTest (" is-lexical" , [](auto &function,
320
- auto &arguments,
321
- auto &test) {
322
- auto value = arguments.takeValue ();
323
- auto isLexical = value->isLexical ();
324
- value->dump ();
325
- auto *boolString = isLexical ? " true" : " false" ;
326
- llvm::errs () << boolString << " \n " ;
327
- });
328
-
329
314
// Arguments:
330
315
// - SILValue: phi
331
316
// Dumps:
You can’t perform that action at this time.
0 commit comments