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

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 07:15:20 PDT 2017


mcrosier added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1341
+//      break;
 
     // If we're parsing an immediate expression, we don't expect a '['.
----------------
avt77 wrote:
> 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?
Can you think of an example where Tok starts with '.' and is *not* an identifier?

In other words, I'm thinking your change is causing this condition to be unconditionally false.  If that's the case, then the right solution might be to remove this check entirely.

Unfortunately, we don't have a lot of lit tests that cover the dot operator.  Have you tested this chance on something more substantial than the llvm test suite?



https://reviews.llvm.org/D32218





More information about the llvm-commits mailing list