Previously, the name concat was used by the operator !con. These
usages are renamed to just con, so that concat can be used by the new operation
which subsumes strconcat, listconcat and also works for code fragments. The old
!strconcat and !listconcat are just aliases for !concat.
Details
- Reviewers
- None
Diff Detail
- Build Status
Buildable 13423 Build 13423: arc lint + arc unit
Event Timeline
lib/TableGen/Record.cpp | ||
---|---|---|
766 | Maybe call this ConcatStringLikeInits or ConcatInits? It should be renamed now that it is not specific to StringInits. |
I use a different approach now, WDYT?
lib/TableGen/Record.cpp | ||
---|---|---|
766 | yeah, makes sense, done |
I'm not sure I like this. Before it was clear: !strconcat is for strings, !codeconcat was for code. Having !strconcat also work on code, and return something which isn't a string, seems unfortunate. And we also have !listconcat. If we want to unify things, I think it would make sense to add !concat (which works on all of those things). [If you do this, then also support !strconcat and !listconcat as aliases to be nice to out-of-tree backends].
From a user's perspective, I got the impression that code [{}] is just a handy shortcut for multiline strings and I was quite surprised that they are internally actual different datatypes. So for me, changing the semantic of !strconcat would remain rather intuitive.
Oh right, thanks, implementing !concat plus the aliases for the old functions seems to be the cleanest solution, assuming that this change won't cause too much confusion in existing code. I think it should be fine but I don't know how many people are using these operators.
use generic concat
If this will be approved I can also update existing usages of strconcat to concat
Maybe call this ConcatStringLikeInits or ConcatInits? It should be renamed now that it is not specific to StringInits.