[PATCH] D99883: [TableGen] Make behavior of list slice suffix consistent across all values
Paul C. Anagnostopoulos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 5 15:45:30 PDT 2021
Paul-C-Anagnostopoulos added inline comments.
================
Comment at: llvm/lib/TableGen/Record.cpp:618-620
+ if (Elements.size() == 1)
+ return getElement(0);
+
----------------
dblaikie wrote:
> Where's the code that already supports the non-literal case? Is there any chance of collapsing these two cases together?
It's in TypedInit::convertInitListSlice(). It's sufficiently different that parameterizing a common subfunction would be more complicated than simply repeating the few common-ish lines of code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99883/new/
https://reviews.llvm.org/D99883
More information about the llvm-commits
mailing list