[llvm] r204431 - [Constant Hoisting] Replace the MapVector with a separate Map and Vector to keep track of constant candidates.
juergen at apple.com
Tue Mar 25 11:07:23 PDT 2014
Ideally it shouldn’t be allowed, but unfortunatelly it isn’t very convenient to use const access methods. I guess that is the reason it wasn’t implemented that way.
On Mar 21, 2014, at 1:54 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Is MapVector's API broken by exposing the ability to break its
> invariants like this? Seems like it really shouldn't allow non-const
> access to the keys... especially since they're duplicated in the map
> and vector so they won't be kept in sync.
> Perhaps it'd be nice to fix it, so this kind of confusing code can't be written?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits