[clang][SemaStmtAsm] small refactoring, NFC.

llvm-svn: 312882
This commit is contained in:
Coby Tayree 2017-09-10 12:39:21 +00:00
parent ef66b3bbab
commit 18f9218689
1 changed files with 5 additions and 3 deletions

View File

@ -62,11 +62,13 @@ static bool CheckAsmLValue(const Expr *E, Sema &S) {
/// isOperandMentioned - Return true if the specified operand # is mentioned /// isOperandMentioned - Return true if the specified operand # is mentioned
/// anywhere in the decomposed asm string. /// anywhere in the decomposed asm string.
static bool isOperandMentioned(unsigned OpNo, static bool
isOperandMentioned(unsigned OpNo,
ArrayRef<GCCAsmStmt::AsmStringPiece> AsmStrPieces) { ArrayRef<GCCAsmStmt::AsmStringPiece> AsmStrPieces) {
for (unsigned p = 0, e = AsmStrPieces.size(); p != e; ++p) { for (unsigned p = 0, e = AsmStrPieces.size(); p != e; ++p) {
const GCCAsmStmt::AsmStringPiece &Piece = AsmStrPieces[p]; const GCCAsmStmt::AsmStringPiece &Piece = AsmStrPieces[p];
if (!Piece.isOperand()) continue; if (!Piece.isOperand())
continue;
// If this is a reference to the input and if the input was the smaller // If this is a reference to the input and if the input was the smaller
// one, then we have to reject this asm. // one, then we have to reject this asm.