Fix finding constant with particular type. (#1724)
With current implementation, the constant manager does not keep around two constant with the same value but different types when the types hash to the same value. So when you start looking for that constant you will get a constant with the wrong type back. I've made a few changes to the constant manager to fix this. First off, I have changed the map from constant to ids to be an std::multimap. This way a single constant can be mapped to mutiple ids each representing a different type. Then when asking for an id of a constant, we can search all of the ids associated with that constant in order to find the one with the correct type.
Loading
Please register or sign in to comment