[PATCH] D75188: [NFC][DebugInfo] Refactor address advancing operations to share code

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 27 06:57:02 PST 2020


labath added a comment.

This isn't really my area, so I don't want to get too involved here, but it seems to me the code readability is going to suffer with all of the extra arguments being added to these (getOperationAdvance + advanceAddr) functions. They're just a bunch of locals from the `LineTable::parse` function -- maybe if these were lambdas inside that function, then they could capture most of these arguments implicitly? Or even create some sort of an object that would carry the state of the line program parsing machinery (like all the flags about reported warnings), and all of these things could be methods on it? That way, we might even be able to break down the `parse` function somehow, which is getting a bit unwieldy...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75188/new/

https://reviews.llvm.org/D75188





More information about the llvm-commits mailing list