Fix a warning in builds without asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-05-16 20:05:08 +00:00
parent 0c2d969bb0
commit dedd6203ad

View File

@ -317,8 +317,7 @@ static GlobalObject &findReplacementForAliasUse(Value &C) {
static void replaceAliasUseWith(Use &U, Value *New) {
GlobalObject &Replacement = findReplacementForAliasUse(*New);
auto *Old = &cast<GlobalObject>(*U);
assert(Old != &Replacement &&
assert(&cast<GlobalObject>(*U) != &Replacement &&
"replaceAliasUseWith cannot form an alias cycle");
U.set(&Replacement);
}