Skip to content

Commit dcc4ad2

Browse files
committed
C++: Sync identical files.
1 parent 54cadcf commit dcc4ad2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/Instruction.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,11 @@ private module Cached {
429429
instr = unreachedInstruction(_) and result = Language::getVoidType()
430430
}
431431

432+
cached
433+
IRType getInstructionResultIRType(Instruction instr) {
434+
result = instr.getResultLanguageType().getIRType()
435+
}
436+
432437
/**
433438
* Holds if `opcode` is the opcode that specifies the operation performed by `instr`.
434439
*

0 commit comments

Comments
 (0)