[PATCH] D27721: Add a c_str() member to StringLiteral
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 15:55:44 PST 2016
zturner added a comment.
Probably should take this discussion to a thread specifically about `StringRefZ`, but fwiw I think that would complicate the logic of `StringRef` considerably while also introducing thread synchronization issues and potentially increasing the size of a `StringRef`. It's possible seeing the actual implementation would change my mind, but so far it doesn't sound like a good candidate for `StringRef`.
Back to this patch, anyone have any other thoughts? FWIW I changed my usage so I'm now storing a `StringRef` instead of a `StringLiteral` (because it actually needed to be constructed without a literal in some scenarios), but the API still seems to make sense here to me (and the attribute seems like a good addition regardless)
https://reviews.llvm.org/D27721
More information about the llvm-commits
mailing list