@@ -247,8 +247,7 @@ class Instruction extends Construction::TStageInstruction {
247247 * Gets the type of the result produced by this instruction. If the instruction does not produce
248248 * a result, its result type will be `IRVoidType`.
249249 */
250- cached
251- final IRType getResultIRType ( ) { result = this .getResultLanguageType ( ) .getIRType ( ) }
250+ final IRType getResultIRType ( ) { result = Construction:: getInstructionResultIRType ( this ) }
252251
253252 /**
254253 * Gets the type of the result produced by this instruction. If the
@@ -995,9 +994,8 @@ class ConstantInstruction extends ConstantValueInstruction {
995994 */
996995class IntegerConstantInstruction extends ConstantInstruction {
997996 IntegerConstantInstruction ( ) {
998- exists ( IRType resultType |
999- resultType = this .getResultIRType ( ) and
1000- ( resultType instanceof IRIntegerType or resultType instanceof IRBooleanType )
997+ exists ( IRType resultType | resultType = this .getResultIRType ( ) |
998+ resultType instanceof IRIntegerType or resultType instanceof IRBooleanType
1001999 )
10021000 }
10031001}
@@ -1009,6 +1007,17 @@ class FloatConstantInstruction extends ConstantInstruction {
10091007 FloatConstantInstruction ( ) { this .getResultIRType ( ) instanceof IRFloatingPointType }
10101008}
10111009
1010+ /**
1011+ * An instruction whose result is a constant value of a pointer type.
1012+ */
1013+ class PointerConstantInstruction extends ConstantInstruction {
1014+ PointerConstantInstruction ( ) {
1015+ exists ( IRType resultType | resultType = this .getResultIRType ( ) |
1016+ resultType instanceof IRAddressType or resultType instanceof IRFunctionAddressType
1017+ )
1018+ }
1019+ }
1020+
10121021/**
10131022 * An instruction whose result is the address of a string literal.
10141023 */
0 commit comments