From 3d442196134d18ed8ee17576638b758362b60742 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 21 Sep 2012 22:22:39 +0000 Subject: [PATCH] [ms-inline asm] Use mnemonicIsValid() in a helpful assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164421 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaStmtAsm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp index 18616ee226..33eb565b43 100644 --- a/lib/Sema/SemaStmtAsm.cpp +++ b/lib/Sema/SemaStmtAsm.cpp @@ -536,6 +536,8 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, SmallString<128> OpcodeStr; for (unsigned i = 0, e = IDVal.size(); i != e; ++i) OpcodeStr.push_back(tolower(IDVal[i])); + // FIXME: Convert to a StmtError. + assert(TargetParser->mnemonicIsValid(OpcodeStr) && "Invalid mnemonic!"); // Parse the operands. llvm::SMLoc IDLoc; -- 2.40.0