[llvm] r344032 - [llvm-exegesis] Fix wrong index type.
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 9 03:06:19 PDT 2018
Author: gchatelet
Date: Tue Oct 9 03:06:19 2018
New Revision: 344032
URL: http://llvm.org/viewvc/llvm-project?rev=344032&view=rev
Log:
[llvm-exegesis] Fix wrong index type.
Modified:
llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.cpp
llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.h
Modified: llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.cpp?rev=344032&r1=344031&r2=344032&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.cpp Tue Oct 9 03:06:19 2018
@@ -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];
Modified: llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.h?rev=344032&r1=344031&r2=344032&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.h (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/MCInstrDescView.h Tue Oct 9 03:06:19 2018
@@ -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
More information about the llvm-commits
mailing list