File tree Expand file tree Collapse file tree
src/semmle/code/cpp/ir/implementation
src/semmle/code/csharp/ir/implementation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147147 * For example: `this:r3_5`
148148 */
149149 final string getDumpString ( ) {
150- result = getDumpLabel ( ) + getInexactSpecifier ( ) + getAnyDef ( ) .getResultId ( )
150+ result = getDumpLabel ( ) + getInexactSpecifier ( ) + getDefinitionId ( )
151+ }
152+
153+ /**
154+ * Gets a string containing the identifier of the definition of this use, or `m?` if the
155+ * definition is not modeled in SSA.
156+ */
157+ private string getDefinitionId ( ) {
158+ exists ( Instruction def |
159+ def = getAnyDef ( ) and
160+ if def .isResultModeled ( ) then result = def .getResultId ( ) else result = "m?"
161+ )
151162 }
152163
153164 /**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147147 * For example: `this:r3_5`
148148 */
149149 final string getDumpString ( ) {
150- result = getDumpLabel ( ) + getInexactSpecifier ( ) + getAnyDef ( ) .getResultId ( )
150+ result = getDumpLabel ( ) + getInexactSpecifier ( ) + getDefinitionId ( )
151+ }
152+
153+ /**
154+ * Gets a string containing the identifier of the definition of this use, or `m?` if the
155+ * definition is not modeled in SSA.
156+ */
157+ private string getDefinitionId ( ) {
158+ exists ( Instruction def |
159+ def = getAnyDef ( ) and
160+ if def .isResultModeled ( ) then result = def .getResultId ( ) else result = "m?"
161+ )
151162 }
152163
153164 /**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147147 * For example: `this:r3_5`
148148 */
149149 final string getDumpString ( ) {
150- result = getDumpLabel ( ) + getInexactSpecifier ( ) + getAnyDef ( ) .getResultId ( )
150+ result = getDumpLabel ( ) + getInexactSpecifier ( ) + getDefinitionId ( )
151+ }
152+
153+ /**
154+ * Gets a string containing the identifier of the definition of this use, or `m?` if the
155+ * definition is not modeled in SSA.
156+ */
157+ private string getDefinitionId ( ) {
158+ exists ( Instruction def |
159+ def = getAnyDef ( ) and
160+ if def .isResultModeled ( ) then result = def .getResultId ( ) else result = "m?"
161+ )
151162 }
152163
153164 /**
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147147 * For example: `this:r3_5`
148148 */
149149 final string getDumpString ( ) {
150- result = getDumpLabel ( ) + getInexactSpecifier ( ) + getAnyDef ( ) .getResultId ( )
150+ result = getDumpLabel ( ) + getInexactSpecifier ( ) + getDefinitionId ( )
151+ }
152+
153+ /**
154+ * Gets a string containing the identifier of the definition of this use, or `m?` if the
155+ * definition is not modeled in SSA.
156+ */
157+ private string getDefinitionId ( ) {
158+ exists ( Instruction def |
159+ def = getAnyDef ( ) and
160+ if def .isResultModeled ( ) then result = def .getResultId ( ) else result = "m?"
161+ )
151162 }
152163
153164 /**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147147 * For example: `this:r3_5`
148148 */
149149 final string getDumpString ( ) {
150- result = getDumpLabel ( ) + getInexactSpecifier ( ) + getAnyDef ( ) .getResultId ( )
150+ result = getDumpLabel ( ) + getInexactSpecifier ( ) + getDefinitionId ( )
151+ }
152+
153+ /**
154+ * Gets a string containing the identifier of the definition of this use, or `m?` if the
155+ * definition is not modeled in SSA.
156+ */
157+ private string getDefinitionId ( ) {
158+ exists ( Instruction def |
159+ def = getAnyDef ( ) and
160+ if def .isResultModeled ( ) then result = def .getResultId ( ) else result = "m?"
161+ )
151162 }
152163
153164 /**
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments