OSDN Git Service

Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts
authorSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 17:07:56 +0000 (17:07 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Mon, 1 May 2017 17:07:56 +0000 (17:07 +0000)
commit2602782e164899d4d79cc4f4c82564ee3810b4e7
tree1e47eb6e2b8c6b143c62879ceaffe67ea8df5f49
parent41673c62eceb523c6eb56eb91ce2aaceaea9599c
Use WeakVH instead of WeakTrackingVH in AliasSetTracker's UnkownInsts

In cases where an instruction (a call site, say) is RAUW'ed with some
other value (this is possible via the `returned` attribute, for
instance), we want the slot in UnknownInsts to point to the original
Instruction we wanted to track, not the value it got replaced by.

Fixes PR32587.

This relands r301426.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301814 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/AliasSetTracker.h
test/Analysis/AliasSet/unknown-inst-tracking.ll [new file with mode: 0644]