IR: Prevent handleChangedOperand() recursion
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 19:36:35 +0000 (19:36 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 12 Jan 2015 19:36:35 +0000 (19:36 +0000)
commitaea8ab800f4e846ad9af0a689ba6d8f382f2b404
treeb0d998ba384bc9a634537b69de5e2c06faa5f6fd
parentd275e025d2d5468632e3b6c1c242534768d11fd0
IR: Prevent handleChangedOperand() recursion

Instead of returning early on `handleChangedOperand()` recursion
(finally identified (and test added) in r225657), prevent it upfront by
releasing operands before RAUW.

Aside from massively different program flow, there should be no
functionality change ;).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225665 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Metadata.h
lib/IR/Metadata.cpp