Added support for sparse strings elements. This is a follow up from the original DenseStringElements.
You also need to add a SparseElementsAttr::getZeroValue<StringRef> so that getValues<T> works:
Use cast here as it is guaranteed to be DenseIntOrFPElementsAttr, dyn_cast implies that it may return null.
You can just inline this in the getZeroValue<StringRef> below. The other methods are only defined like this because the values can't be constructed inline in the header file.
This needs to be a SFINAE template to avoid having ambiguous methods.
nit: Newline before here.