diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 0cb86d03d72..96e882b19fd 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -825,6 +825,9 @@ void MatchableInfo::tokenizeAsmString(const AsmMatcherInfo &Info) {      throw TGError(TheDef->getLoc(),                    "Instruction '" + TheDef->getName() + "' has no tokens");    Mnemonic = AsmOperands[0].Token; +  if (Mnemonic.empty()) +    throw TGError(TheDef->getLoc(), +                  "Missing instruction mnemonic");    // FIXME : Check and raise an error if it is a register.    if (Mnemonic[0] == '$')      throw TGError(TheDef->getLoc(),  | 

