Don't silently ignore argument or value locations. (#157)

No current tests actually rely on this, and it's surprising.
This commit is contained in:
Dan Gohman
2017-09-14 09:26:37 -07:00
committed by GitHub
parent 45f50120ef
commit 78c39ce078

View File

@@ -1010,9 +1010,7 @@ impl<'a> Parser<'a> {
.map(ArgumentLoc::Reg)
.ok_or(self.error("invalid register name"))
} else {
// We are unable to parse the register without a TargetISA, so we quietly
// ignore it.
Ok(ArgumentLoc::Unassigned)
err!(self.loc, "argument location requires exactly one isa")
}
}
Some(Token::Integer(_)) => {
@@ -1491,8 +1489,7 @@ impl<'a> Parser<'a> {
.map(ValueLoc::Reg)
.ok_or(self.error("invalid register value location"))
} else {
// For convenience we ignore value locations when no unique ISA is specified
Ok(ValueLoc::Unassigned)
err!(self.loc, "value location requires exactly one isa")
}
}
Some(Token::Minus) => {