File tree Expand file tree Collapse file tree 9 files changed +1712
-1657
lines changed
src/semmle/code/cpp/ir/implementation
src/semmle/code/csharp/ir/implementation Expand file tree Collapse file tree 9 files changed +1712
-1657
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147
147
* For example: `this:r3_5`
148
148
*/
149
149
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
+ )
151
162
}
152
163
153
164
/**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147
147
* For example: `this:r3_5`
148
148
*/
149
149
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
+ )
151
162
}
152
163
153
164
/**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147
147
* For example: `this:r3_5`
148
148
*/
149
149
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
+ )
151
162
}
152
163
153
164
/**
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 {
147
147
* For example: `this:r3_5`
148
148
*/
149
149
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
+ )
151
162
}
152
163
153
164
/**
Original file line number Diff line number Diff line change @@ -147,7 +147,18 @@ class Operand extends TOperand {
147
147
* For example: `this:r3_5`
148
148
*/
149
149
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
+ )
151
162
}
152
163
153
164
/**
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments