From: Chad Rosier Date: Mon, 3 Sep 2012 02:30:13 +0000 (+0000) Subject: [ms-inline asm] Update for the MatchInstruction API change in r163101. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be5c3fbec3a430bab2524e9315f58f64815bfeaf;p=clang [ms-inline asm] Update for the MatchInstruction API change in r163101. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163102 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp index 14ea70b292..bdd2cbce95 100644 --- a/lib/Sema/SemaStmtAsm.cpp +++ b/lib/Sema/SemaStmtAsm.cpp @@ -537,23 +537,25 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc, Parser->ParseIdentifier(IDVal); // Canonicalize the opcode to lower case. - SmallString<128> Opcode; + SmallString<128> OpcodeStr; for (unsigned i = 0, e = IDVal.size(); i != e; ++i) - Opcode.push_back(tolower(IDVal[i])); + OpcodeStr.push_back(tolower(IDVal[i])); // Parse the operands. llvm::SMLoc IDLoc; SmallVector Operands; - bool HadError = TargetParser->ParseInstruction(Opcode.str(), IDLoc, + bool HadError = TargetParser->ParseInstruction(OpcodeStr.str(), IDLoc, Operands); // If we had an error parsing the operands, fail gracefully. if (HadError) { DEF_SIMPLE_MSASM; return Owned(NS); } // Match the MCInstr. + unsigned Kind; + unsigned Opcode; unsigned ErrorInfo; SmallVector Instrs; - HadError = TargetParser->MatchInstruction(IDLoc, Operands, Instrs, - ErrorInfo, + HadError = TargetParser->MatchInstruction(IDLoc, Kind, Opcode, Operands, + Instrs, ErrorInfo, /*matchingInlineAsm*/ true); // If we had an error parsing the operands, fail gracefully. if (HadError) { DEF_SIMPLE_MSASM; return Owned(NS); }