diff --git a/lib/IR/Value.cpp b/lib/IR/Value.cpp index a3c02862007..d734e4ea818 100644 --- a/lib/IR/Value.cpp +++ b/lib/IR/Value.cpp @@ -317,8 +317,7 @@ static GlobalObject &findReplacementForAliasUse(Value &C) { static void replaceAliasUseWith(Use &U, Value *New) { GlobalObject &Replacement = findReplacementForAliasUse(*New); - auto *Old = &cast(*U); - assert(Old != &Replacement && + assert(&cast(*U) != &Replacement && "replaceAliasUseWith cannot form an alias cycle"); U.set(&Replacement); }