[llvm] r221960 - IR: Rewrite uniquing and creation of MDString
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Nov 18 11:19:16 PST 2014
> On 2014 Nov 18, at 10:06, David Blaikie <dblaikie at gmail.com> wrote:
>
> Unexposed, but not magic - it can be implemented in LLVM as it is in libc++. A few of these utilities are a bit of a pain to write, but they're generic enough not to need to be written very often.
This is spiraling into a major project :). I just want to pass in
a context by reference to prevent reference/pointer disagreement
in `MDString::get()` vs. `MDString::MDString()`, so I want some
API that is clear and correct.
How about I file a PR for this? Your argument that `emplace()`
would be a good abstraction here is convincing, but encapsulating
`StringMap` is pretty orthogonal to my current work.
In the meantime, I think the perfect-forwarding I added in the
3-arg version of `StringMapEntry::Create()` is an incremental
improvement.
More information about the llvm-commits
mailing list