[PATCH] D98276: [AsmParser][SystemZ][z/OS] Introducing HLASM Parser support to AsmParser - Part 1
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 12 09:14:35 PST 2021
uweigand added inline comments.
================
Comment at: llvm/lib/MC/MCParser/AsmParser.cpp:6139
+
+ checkAndGenerateLOCDirectiveForInstruction(ParseHadError, Loc);
+
----------------
anirudhp wrote:
> uweigand wrote:
> > I guess now this doesn't really have to be a separate routine any more?
> Yes, you're right. But since the rest of the function is essentially just `getTargetParser().ParseInstruction` and `getTargetParser().MatchAndEmitInstruction()`, I didn't want to decompose logic in `checkAndGenerateLOCDirectiveForInstruction` into the same function. I'd rather have it as a separate routine, since it does something different.
My point was that it might be preferable to minimize changes to existing code. Just split the old parseStatement in two parts. Leave the second part (the new parseAndMatchAndEmitTargetInstruction) where it is above. The diff should just show the end of one function and the header of the new function being inserted, the rest of the lines are unchanged.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98276/new/
https://reviews.llvm.org/D98276
More information about the llvm-commits
mailing list