aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/InstructionDescriptor.cpp
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 17:37:42 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 17:37:42 +0800
commit6a7b083f322f4ac47e58cbf9d4d5fd4d1f6fecd0 (patch)
treef363c502f0e2b9cda2f12928049275a433db6ad4 /backend/lib/CodeGen/InstructionDescriptor.cpp
parentadcf8c9b1bd1b47e00bf859693112cea1f7e8c9f (diff)
downloadrcc-project-6a7b083f322f4ac47e58cbf9d4d5fd4d1f6fecd0.tar.gz
rcc-project-6a7b083f322f4ac47e58cbf9d4d5fd4d1f6fecd0.tar.xz
[MIR] Accept fixed-baseline LLVM syntax
Diffstat (limited to 'backend/lib/CodeGen/InstructionDescriptor.cpp')
-rw-r--r--backend/lib/CodeGen/InstructionDescriptor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/backend/lib/CodeGen/InstructionDescriptor.cpp b/backend/lib/CodeGen/InstructionDescriptor.cpp
index 48d4f10..fa00537 100644
--- a/backend/lib/CodeGen/InstructionDescriptor.cpp
+++ b/backend/lib/CodeGen/InstructionDescriptor.cpp
@@ -395,8 +395,12 @@ Expected<void> InstructionSet::validateExplicitOperands(const InstructionDescrip
}
const OperandDescriptor &OperandDesc = descriptorForOperand(Descriptor, *Shape, Index);
const auto Validation = validateOperand(OperandDesc, Operand, RegInfo);
- if (!Validation)
- return std::unexpected(Validation.error());
+ if (!Validation) {
+ return makeUnexpected(
+ Validation.error().code(),
+ "operand " + std::to_string(Index) + " of '" + Descriptor.Name + "': " +
+ std::string(Validation.error().message()));
+ }
if (Operand.isRegister()) {
if (isDefRole(OperandDesc.RegisterRole)) {
if (SawUse) {