diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-08-08 14:05:23 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-08 14:05:23 +0400 |
commit | 00f90d394ae42a490f87076c69f7c00f53f77fd7 (patch) | |
tree | 13b2e91d437bae8d9ed2793df230deabdc00e462 /llvm/lib/IR/Verifier.cpp | |
parent | 635d20e9e72e25966b196bb012a90e750ae00c6d (diff) | |
download | llvm-00f90d394ae42a490f87076c69f7c00f53f77fd7.zip llvm-00f90d394ae42a490f87076c69f7c00f53f77fd7.tar.gz llvm-00f90d394ae42a490f87076c69f7c00f53f77fd7.tar.bz2 |
Verifier: Reword range metadata error message (#102441)
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 4bcd799..402af37 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -4142,8 +4142,10 @@ void Verifier::verifyRangeMetadata(const Value &I, const MDNode *Range, ConstantInt *High = mdconst::dyn_extract<ConstantInt>(Range->getOperand(2 * i + 1)); Check(High, "The upper limit must be an integer!", High); - Check(High->getType() == Low->getType() && - High->getType() == Ty->getScalarType(), + + Check(High->getType() == Low->getType(), "Range pair types must match!", + &I); + Check(High->getType() == Ty->getScalarType(), "Range types must match instruction type!", &I); APInt HighV = High->getValue(); |