Add Utils.expandPrefixes as Prefix Unique helper (#900)
This adds a utility, expandPrefixes, that expands a string into all
possible prefixes based on a delimiter. Any repeated occurrence of the
delimiter is viewed as a contributing to a prefix. E.g., "foo_bar" expands
to Seq("foo_", "foo_bar"). This is useful for inlining and keyword
mangling on LowForm. You would like to be able to generate a new name that
is prefix unique with respect to a namespace.
Signed-off-by:
Schuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit 953deb5d)
parent
12db3ada
Please register or sign in to comment