Ruby: Include name of variable in UninitializedDefinition.toString

This commit is contained in:
Tom Hvitved
2023-11-14 10:47:48 +01:00
parent 28a5a1d507
commit f1b67ade9b
4 changed files with 19 additions and 17 deletions

View File

@@ -256,14 +256,16 @@ module Ssa {
* `x` is inserted at the start of `m`.
*/
class UninitializedDefinition extends Definition, SsaImpl::WriteDefinition {
private Variable v;
UninitializedDefinition() {
exists(BasicBlock bb, int i, Variable v |
exists(BasicBlock bb, int i |
this.definesAt(v, bb, i) and
SsaImpl::uninitializedWrite(bb, i, v)
)
}
final override string toString() { result = "<uninitialized>" }
final override string toString() { result = "<uninitialized> " + v }
final override Location getLocation() { result = this.getBasicBlock().getLocation() }
}