Clean up static analyzer warnings.
[oota-llvm.git] / utils / TableGen / CodeGenInstruction.cpp
index 7c5e6fcc9b9b67ddc6ea2b554a18bae1a6e151ea..4bea96927c7e5570aeae48dbde19c333a2a51f24 100644 (file)
@@ -537,7 +537,7 @@ bool CodeGenInstAlias::tryAliasOpMatch(DagInit *Result, unsigned AliasOpNo,
   // If both are Operands with the same MVT, allow the conversion. It's
   // up to the user to make sure the values are appropriate, just like
   // for isel Pat's.
-  if (InstOpRec->isSubClassOf("Operand") &&
+  if (InstOpRec->isSubClassOf("Operand") && ADI &&
       ADI->getDef()->isSubClassOf("Operand")) {
     // FIXME: What other attributes should we check here? Identical
     // MIOperandInfo perhaps?