[PATCH] D32218: X86AsmParser.cpp asserts: OperandStack.size() > 1 && "Too few operands."

Andrew V. Tischenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 03:28:30 PDT 2017


avt77 added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1335
 
+    AsmToken::TokenKind TK = getLexer().getKind();
     // The period in the dot operator (e.g., [ebx].foo.bar) is parsed as an
----------------
RKSimon wrote:
> Did this actually need moving?
It depends on decision about the check below: if we can remove the check then we should not move that but if we have to keep the modified version of the check then we have to move that.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1341
+//      break;
 
     // If we're parsing an immediate expression, we don't expect a '['.
----------------
RKSimon wrote:
> Don't comment out code - delete it.
I'm waiting for the answer from @mcrosier: if we don't need this check at all then I'll remove the commented code and return the local variable initialization above to its origin place.

@mcrosier, could you comment this patch now?


https://reviews.llvm.org/D32218





More information about the llvm-commits mailing list