Commit 20c3e548 authored by Schuyler Eldridge's avatar Schuyler Eldridge Committed by Jim Lawson
Browse files

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: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit 953deb5d)
parent 12db3ada
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment