Skip to content

Commit 6553544

Browse files
C++: Fix merge conflicts
1 parent 0cde86d commit 6553544

File tree

9 files changed

+37
-37
lines changed

9 files changed

+37
-37
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module InstructionSanity {
5050
/**
5151
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
5252
*/
53-
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
53+
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
5454
exists(OperandTag tag |
5555
expectsOperand(instr, tag) and
5656
not exists(NonPhiOperand operand |
@@ -59,7 +59,7 @@ module InstructionSanity {
5959
) and
6060
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
6161
tag.toString() + "' in function '$@'." and
62-
func = instr.getEnclosingFunctionIR() and
62+
func = instr.getEnclosingIRFunction() and
6363
funcText = getIdentityString(func.getFunction())
6464
)
6565
}

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Operand extends TOperand {
2929
result = getUseInstruction().getLocation()
3030
}
3131

32-
final FunctionIR getEnclosingFunctionIR() {
33-
result = getUseInstruction().getEnclosingFunctionIR()
32+
final IRFunction getEnclosingIRFunction() {
33+
result = getUseInstruction().getEnclosingIRFunction()
3434
}
3535

3636
/**
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
417417
/**
418418
* An operand of a `PhiInstruction`.
419419
*/
420-
class PhiOperand extends MemoryOperand, TPhiOperand {
420+
class PhiInputOperand extends MemoryOperand, TPhiOperand {
421421
PhiInstruction useInstr;
422422
Instruction defInstr;
423423
IRBlock predecessorBlock;
424424
Overlap overlap;
425425

426-
PhiOperand() {
426+
PhiInputOperand() {
427427
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
428428
}
429429

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/AliasedSSA.qll

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ private newtype TMemoryLocation =
3535
hasOperandMemoryAccess(_, var, type, startBitOffset, endBitOffset)
3636
}
3737
or
38-
TUnknownMemoryLocation(FunctionIR funcIR) or
39-
TUnknownVirtualVariable(FunctionIR funcIR)
38+
TUnknownMemoryLocation(IRFunction funcIR) or
39+
TUnknownVirtualVariable(IRFunction funcIR)
4040

4141
/**
4242
* Represents the memory location accessed by a memory operand or memory result. In this implementation, the location is
@@ -99,7 +99,7 @@ class VariableMemoryLocation extends TVariableMemoryLocation, MemoryLocation {
9999

100100
override final VirtualVariable getVirtualVariable() {
101101
if variableAddressEscapes(var) then
102-
result = TUnknownVirtualVariable(var.getEnclosingFunctionIR())
102+
result = TUnknownVirtualVariable(var.getEnclosingIRFunction())
103103
else
104104
result = TVariableMemoryLocation(var, var.getType(), 0, var.getType().getSize() * 8)
105105
}
@@ -130,7 +130,7 @@ class VariableVirtualVariable extends VariableMemoryLocation, VirtualVariable {
130130
* An access to memory that is not known to be confined to a specific `IRVariable`.
131131
*/
132132
class UnknownMemoryLocation extends TUnknownMemoryLocation, MemoryLocation {
133-
FunctionIR funcIR;
133+
IRFunction funcIR;
134134

135135
UnknownMemoryLocation() {
136136
this = TUnknownMemoryLocation(funcIR)
@@ -157,7 +157,7 @@ class UnknownMemoryLocation extends TUnknownMemoryLocation, MemoryLocation {
157157
* An access to all aliased memory.
158158
*/
159159
class UnknownVirtualVariable extends TUnknownVirtualVariable, VirtualVariable {
160-
FunctionIR funcIR;
160+
IRFunction funcIR;
161161

162162
UnknownVirtualVariable() {
163163
this = TUnknownVirtualVariable(funcIR)
@@ -247,16 +247,16 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
247247
)
248248
)
249249
else (
250-
result = TUnknownMemoryLocation(instr.getEnclosingFunctionIR())
250+
result = TUnknownMemoryLocation(instr.getEnclosingIRFunction())
251251
)
252252
) or
253253
(
254254
kind instanceof EscapedMemoryAccess and
255-
result = TUnknownVirtualVariable(instr.getEnclosingFunctionIR())
255+
result = TUnknownVirtualVariable(instr.getEnclosingIRFunction())
256256
) or
257257
(
258258
kind instanceof EscapedMayMemoryAccess and
259-
result = TUnknownMemoryLocation(instr.getEnclosingFunctionIR())
259+
result = TUnknownMemoryLocation(instr.getEnclosingIRFunction())
260260
)
261261
)
262262
)
@@ -275,16 +275,16 @@ MemoryLocation getOperandMemoryLocation(MemoryOperand operand) {
275275
)
276276
)
277277
else (
278-
result = TUnknownMemoryLocation(operand.getEnclosingFunctionIR())
278+
result = TUnknownMemoryLocation(operand.getEnclosingIRFunction())
279279
)
280280
) or
281281
(
282282
kind instanceof EscapedMemoryAccess and
283-
result = TUnknownVirtualVariable(operand.getEnclosingFunctionIR())
283+
result = TUnknownVirtualVariable(operand.getEnclosingIRFunction())
284284
) or
285285
(
286286
kind instanceof EscapedMayMemoryAccess and
287-
result = TUnknownMemoryLocation(operand.getEnclosingFunctionIR())
287+
result = TUnknownMemoryLocation(operand.getEnclosingIRFunction())
288288
)
289289
)
290290
)

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/internal/SSAConstruction.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cached private module Cached {
1616
}
1717

1818
cached predicate functionHasIR(Function func) {
19-
exists(OldIR::FunctionIR funcIR |
19+
exists(OldIR::IRFunction funcIR |
2020
funcIR.getFunction() = func
2121
)
2222
}
@@ -92,7 +92,7 @@ cached private module Cached {
9292
)
9393
)
9494
else (
95-
result = instruction.getEnclosingFunctionIR().getUnmodeledDefinitionInstruction() and
95+
result = instruction.getEnclosingIRFunction().getUnmodeledDefinitionInstruction() and
9696
overlap instanceof MustTotallyOverlap
9797
)
9898
) or
@@ -112,7 +112,7 @@ cached private module Cached {
112112
tag instanceof ChiPartialOperandTag and
113113
overlap instanceof MustExactlyOverlap
114114
or
115-
exists(FunctionIR f |
115+
exists(IRFunction f |
116116
tag instanceof UnmodeledUseOperandTag and
117117
result = f.getUnmodeledDefinitionInstruction() and
118118
instruction = f.getUnmodeledUseInstruction() and
@@ -288,7 +288,7 @@ cached private module Cached {
288288
result instanceof Opcode::Unreached
289289
}
290290

291-
cached FunctionIR getInstructionEnclosingFunctionIR(Instruction instruction) {
291+
cached IRFunction getInstructionEnclosingIRFunction(Instruction instruction) {
292292
exists(OldInstruction oldInstruction |
293293
instruction = WrappedInstruction(oldInstruction)
294294
or

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module InstructionSanity {
5050
/**
5151
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
5252
*/
53-
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
53+
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
5454
exists(OperandTag tag |
5555
expectsOperand(instr, tag) and
5656
not exists(NonPhiOperand operand |
@@ -59,7 +59,7 @@ module InstructionSanity {
5959
) and
6060
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
6161
tag.toString() + "' in function '$@'." and
62-
func = instr.getEnclosingFunctionIR() and
62+
func = instr.getEnclosingIRFunction() and
6363
funcText = getIdentityString(func.getFunction())
6464
)
6565
}

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Operand extends TOperand {
2929
result = getUseInstruction().getLocation()
3030
}
3131

32-
final FunctionIR getEnclosingFunctionIR() {
33-
result = getUseInstruction().getEnclosingFunctionIR()
32+
final IRFunction getEnclosingIRFunction() {
33+
result = getUseInstruction().getEnclosingIRFunction()
3434
}
3535

3636
/**
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
417417
/**
418418
* An operand of a `PhiInstruction`.
419419
*/
420-
class PhiOperand extends MemoryOperand, TPhiOperand {
420+
class PhiInputOperand extends MemoryOperand, TPhiOperand {
421421
PhiInstruction useInstr;
422422
Instruction defInstr;
423423
IRBlock predecessorBlock;
424424
Overlap overlap;
425425

426-
PhiOperand() {
426+
PhiInputOperand() {
427427
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
428428
}
429429

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module InstructionSanity {
5050
/**
5151
* Holds if instruction `instr` is missing an expected operand with tag `tag`.
5252
*/
53-
query predicate missingOperand(Instruction instr, string message, FunctionIR func, string funcText) {
53+
query predicate missingOperand(Instruction instr, string message, IRFunction func, string funcText) {
5454
exists(OperandTag tag |
5555
expectsOperand(instr, tag) and
5656
not exists(NonPhiOperand operand |
@@ -59,7 +59,7 @@ module InstructionSanity {
5959
) and
6060
message = "Instruction '" + instr.getOpcode().toString() + "' is missing an expected operand with tag '" +
6161
tag.toString() + "' in function '$@'." and
62-
func = instr.getEnclosingFunctionIR() and
62+
func = instr.getEnclosingIRFunction() and
6363
funcText = getIdentityString(func.getFunction())
6464
)
6565
}

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Operand extends TOperand {
2929
result = getUseInstruction().getLocation()
3030
}
3131

32-
final FunctionIR getEnclosingFunctionIR() {
33-
result = getUseInstruction().getEnclosingFunctionIR()
32+
final IRFunction getEnclosingIRFunction() {
33+
result = getUseInstruction().getEnclosingIRFunction()
3434
}
3535

3636
/**
@@ -417,13 +417,13 @@ class SideEffectOperand extends TypedOperand {
417417
/**
418418
* An operand of a `PhiInstruction`.
419419
*/
420-
class PhiOperand extends MemoryOperand, TPhiOperand {
420+
class PhiInputOperand extends MemoryOperand, TPhiOperand {
421421
PhiInstruction useInstr;
422422
Instruction defInstr;
423423
IRBlock predecessorBlock;
424424
Overlap overlap;
425425

426-
PhiOperand() {
426+
PhiInputOperand() {
427427
this = TPhiOperand(useInstr, defInstr, predecessorBlock, overlap)
428428
}
429429

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ cached private module Cached {
1616
}
1717

1818
cached predicate functionHasIR(Function func) {
19-
exists(OldIR::FunctionIR funcIR |
19+
exists(OldIR::IRFunction funcIR |
2020
funcIR.getFunction() = func
2121
)
2222
}
@@ -92,7 +92,7 @@ cached private module Cached {
9292
)
9393
)
9494
else (
95-
result = instruction.getEnclosingFunctionIR().getUnmodeledDefinitionInstruction() and
95+
result = instruction.getEnclosingIRFunction().getUnmodeledDefinitionInstruction() and
9696
overlap instanceof MustTotallyOverlap
9797
)
9898
) or
@@ -112,7 +112,7 @@ cached private module Cached {
112112
tag instanceof ChiPartialOperandTag and
113113
overlap instanceof MustExactlyOverlap
114114
or
115-
exists(FunctionIR f |
115+
exists(IRFunction f |
116116
tag instanceof UnmodeledUseOperandTag and
117117
result = f.getUnmodeledDefinitionInstruction() and
118118
instruction = f.getUnmodeledUseInstruction() and
@@ -288,7 +288,7 @@ cached private module Cached {
288288
result instanceof Opcode::Unreached
289289
}
290290

291-
cached FunctionIR getInstructionEnclosingFunctionIR(Instruction instruction) {
291+
cached IRFunction getInstructionEnclosingIRFunction(Instruction instruction) {
292292
exists(OldInstruction oldInstruction |
293293
instruction = WrappedInstruction(oldInstruction)
294294
or

0 commit comments

Comments
 (0)