[llvm] r209012 - Fix a warning in builds without asserts.

Rafael Espindola rafael.espindola at gmail.com
Fri May 16 13:05:08 PDT 2014


Author: rafael
Date: Fri May 16 15:05:08 2014
New Revision: 209012

URL: http://llvm.org/viewvc/llvm-project?rev=209012&view=rev
Log:
Fix a warning in builds without asserts.

Modified:
    llvm/trunk/lib/IR/Value.cpp

Modified: llvm/trunk/lib/IR/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Value.cpp?rev=209012&r1=209011&r2=209012&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Value.cpp (original)
+++ llvm/trunk/lib/IR/Value.cpp Fri May 16 15:05:08 2014
@@ -317,8 +317,7 @@ static GlobalObject &findReplacementForA
 
 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);
 }





More information about the llvm-commits mailing list