[llvm] r344907 - [llvm-exegesis] Crash when assembling invalid Operand
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 22 08:06:10 PDT 2018
Author: gchatelet
Date: Mon Oct 22 08:06:10 2018
New Revision: 344907
URL: http://llvm.org/viewvc/llvm-project?rev=344907&view=rev
Log:
[llvm-exegesis] Crash when assembling invalid Operand
Modified:
llvm/trunk/tools/llvm-exegesis/lib/Assembler.cpp
Modified: llvm/trunk/tools/llvm-exegesis/lib/Assembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-exegesis/lib/Assembler.cpp?rev=344907&r1=344906&r2=344907&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-exegesis/lib/Assembler.cpp (original)
+++ llvm/trunk/tools/llvm-exegesis/lib/Assembler.cpp Mon Oct 22 08:06:10 2018
@@ -110,6 +110,8 @@ static void fillMachineFunction(llvm::Ma
Builder.addReg(Op.getReg(), Flags);
} else if (Op.isImm()) {
Builder.addImm(Op.getImm());
+ } else if (!Op.isValid()) {
+ llvm_unreachable("Operand is not set");
} else {
llvm_unreachable("Not yet implemented");
}
More information about the llvm-commits
mailing list