C#: Remove references to getAFirstReadAtNode.

This commit is contained in:
Anders Schack-Mulligen
2026-04-23 14:25:43 +02:00
parent e5d219a039
commit fb438bf512
2 changed files with 2 additions and 6 deletions

View File

@@ -500,11 +500,7 @@ class AssignableDefinition extends TAssignableDefinition {
*/
pragma[nomagic]
AssignableRead getAFirstRead() {
exists(ControlFlowNode cfn | cfn = result.getControlFlowNode() |
exists(Ssa::ExplicitDefinition def | result = def.getAFirstReadAtNode(cfn) |
this = def.getADefinition()
)
)
exists(Ssa::ExplicitDefinition def | result = def.getAFirstRead() | this = def.getADefinition())
}
/** Gets a textual representation of this assignable definition. */

View File

@@ -241,7 +241,7 @@ private Ssa::Definition getAnUltimateDefinition(Ssa::Definition def) {
* exception.
*/
private predicate defReaches(Ssa::Definition def, ControlFlowNode cfn) {
exists(def.getAFirstReadAtNode(cfn))
def.getAFirstRead().getControlFlowNode() = cfn
or
exists(ControlFlowNode mid | defReaches(def, mid) |
SsaImpl::adjacentReadPairSameVar(_, mid, cfn) and