HomePhabricator

[PartialInlining] Fix Crash from holding a reference to a destructed ORE.

Description

[PartialInlining] Fix Crash from holding a reference to a destructed ORE.

The callback used to create an ORE for the legacy PI pass caches the allocated
object in a unique_ptr in the runOnModule function, and returns a reference to
that object. Under certian circumstances we can end up holding onto that
reference after the OREs destruction. Rather then allowing the new and legacy
passes to create ORE object in diffrent ways, create the ORE at the point of
use.

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

Details

Committed
sfertileApr 20 2018, 12:56 PM
Differential Revision
D43219: [PartialInlining] Fix Crash from holding a reference to a destructed ORE
Parents
rL330472: [Hexagon] hexagon-autohvx was left on again
Branches
Unknown
Tags
Unknown