summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenMapTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenMapTable.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenMapTable.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenMapTable.cpp b/llvm/utils/TableGen/CodeGenMapTable.cpp
index 43348b622a7..e5b0426cdcc 100644
--- a/llvm/utils/TableGen/CodeGenMapTable.cpp
+++ b/llvm/utils/TableGen/CodeGenMapTable.cpp
@@ -243,7 +243,12 @@ void MapTableEmitter::buildRowInstrMap() {
std::vector<Init*> KeyValue;
ListInit *RowFields = InstrMapDesc.getRowFields();
for (Init *RowField : RowFields->getValues()) {
- Init *CurInstrVal = CurInstr->getValue(RowField)->getValue();
+ RecordVal *RecVal = CurInstr->getValue(RowField);
+ if (RecVal == nullptr)
+ PrintFatalError(CurInstr->getLoc(), "No value " +
+ RowField->getAsString() + " found in \"" +
+ CurInstr->getName() + "\" instruction description.");
+ Init *CurInstrVal = RecVal->getValue();
KeyValue.push_back(CurInstrVal);
}
OpenPOWER on IntegriCloud