[llvm-exegesis] Fix wrong index type.

llvm-svn: 344032
This commit is contained in:
Guillaume Chatelet 2018-10-09 10:06:19 +00:00
parent 1c9870cf13
commit fe5b0b488e
2 changed files with 3 additions and 2 deletions

View File

@ -18,9 +18,10 @@
namespace exegesis {
unsigned Variable::getIndex() const {
assert(Index >= 0);
assert(Index >= 0 && "Index must be set");
return Index;
}
unsigned Variable::getPrimaryOperandIndex() const {
assert(!TiedOperands.empty());
return TiedOperands[0];

View File

@ -47,7 +47,7 @@ struct Variable {
llvm::MCOperand AssignedValue;
// The index of this Variable in Instruction.Variables and its associated
// Value in InstructionBuilder.VariableValues.
unsigned Index = -1;
int Index = -1;
};
// MCOperandInfo can only represents Explicit operands. This object gives a