[PATCH] D41552: [MC] - Teach llvm-mc to handle comdats whose names are numbers.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 24 00:22:33 PST 2017
>A nice followup would be to make sure we produce an error if we can't
>parse to the end of the line.
MC actually has code that checks for reaching of EOL:
Issue is that for minor group of function calls (including parseGroup() call, lines 561-571),
parser returns true. What means error condition. It does not return TokError,
and that looks fine because intention is to propogate the existent error
from the deep I think.
That does not always work good though, for example parseIdentifier() may return true (so error),
and do not set error condition. Because there is code that want to continue parsing
after that, for example:
And looks 'parseIdentifier()' calls never set error conditions by themselves.
What I think we can do is to ensure that we either return true when have error condition,
or return TokError from these functions to set it. (or false when there is no errors).
I prepared patch for parseGroup(): https://reviews.llvm.org/D41559
More information about the llvm-commits