C++: Improve consistency failure message for multiple MemoryLocations on a memory access.

This commit is contained in:
Dave Bartolomeo
2021-05-07 16:04:01 -04:00
parent 54b9f2175d
commit 653ef9d257
3 changed files with 12 additions and 3 deletions

View File

@@ -934,7 +934,10 @@ module SSAConsistency {
locationCount > 1 and
func = operand.getEnclosingIRFunction() and
funcText = Language::getIdentityString(func.getFunction()) and
message = "Operand has " + locationCount.toString() + " memory accesses in function '$@'."
message =
operand.getUse().toString() + " " + "Operand has " + locationCount.toString() +
" memory accesses in function '$@': " +
strictconcat(Alias::getOperandMemoryLocation(operand).toString(), ", ")
)
}