HomePhabricator

Current implementation of Value::replaceUsesExceptBlockAddr() uses UseList

Description

Current implementation of Value::replaceUsesExceptBlockAddr() uses UseList
iterator to walk the list which keeps changing inside the loop. When the
UseList contains several uses with the same user, we end processing the same
user more than once, which leads to an assert.

With this fix, unique users are saved and processed later to avoid
processing duplicates.

Differential Revision: https://reviews.llvm.org/D39864

Details

Committed
dmikulinNov 16 2017, 4:30 PM
Differential Revision
D39864: Fix for CFI type tests lowering assert.
Parents
rL318476: [XRay][test-suite] Upgrade Google benchmark library
Branches
Unknown
Tags
Unknown