Skip to content

Commit 9641019

Browse files
committed
[gardening] Move maybeScopeLess from SIL/Verifier/SILVerifier.cpp -> SIL/IR/SILDebugScope.cpp.
This is defined in SILDebugScope.h, so I don't know why it was put into SILVerifier.cpp.
1 parent ad09f43 commit 9641019

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/SIL/IR/SILDebugScope.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,10 @@ SILFunction *SILDebugScope::getParentFunction() const {
5555
return ParentScope->getParentFunction();
5656
return Parent.get<SILFunction *>();
5757
}
58+
59+
/// Determine whether an instruction may not have a SILDebugScope.
60+
bool swift::maybeScopeless(SILInstruction &I) {
61+
if (I.getFunction()->isBare())
62+
return true;
63+
return !isa<DebugValueInst>(I) && !isa<DebugValueAddrInst>(I);
64+
}

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5527,10 +5527,3 @@ void SILModule::verify() const {
55275527
prop.verify(*this);
55285528
}
55295529
}
5530-
5531-
/// Determine whether an instruction may not have a SILDebugScope.
5532-
bool swift::maybeScopeless(SILInstruction &I) {
5533-
if (I.getFunction()->isBare())
5534-
return true;
5535-
return !isa<DebugValueInst>(I) && !isa<DebugValueAddrInst>(I);
5536-
}

0 commit comments

Comments
 (0)