DenseMap's operator[] performs an insertion if the entry isn't found. The second phase of ConstantMerge isn't trying to insert anything: it's just looking to see if the first phased performed an insertion. Use find instead, avoiding insertion of every single global initializer in the map of constants. This has the side-effect of making all entries in CMap non-null (because only global declarations would have null initializers, and that would be a bug).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 21261 Build 21261: arc lint + arc unit
Event Timeline
Comment Actions
Oh, read the code more - my mistake. Thought you were only testing for whether something was in the container - not actually having to use it afterwards. Carry on!