]> granicus.if.org Git - llvm/commitdiff
[NewGVN] Restore old code to placate buildbots.
authorDavide Italiano <davide@freebsd.org>
Mon, 2 Jan 2017 18:41:34 +0000 (18:41 +0000)
committerDavide Italiano <davide@freebsd.org>
Mon, 2 Jan 2017 18:41:34 +0000 (18:41 +0000)
Apparently my suggestion of using ternary doesn't really work
as clang complains about incompatible types on LHS and RHS. Some
GCC versions happen to accept the code but clang behaviour is
correct here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/NewGVN.cpp

index 3a10a9f0991c34d3e69e4b7bb898acc91e2ecb75..50a6130a6472dc5d3f76676042c35508f5179153 100644 (file)
@@ -780,8 +780,12 @@ const Expression *NewGVN::performSymbolicCallEvaluation(Instruction *I,
 // Update the memory access equivalence table to say that From is equal to To,
 // and return true if this is different from what already existed in the table.
 bool NewGVN::setMemoryAccessEquivTo(MemoryAccess *From, MemoryAccess *To) {
-  DEBUG(dbgs() << "Setting " << *From << " equivalent to "
-               << (To ? "itself" : *To) << "\n");
+  DEBUG(dbgs() << "Setting " << *From << " equivalent to ");
+  if (!To)
+    DEBUG(dbgs() << "itself");
+  else
+    DEBUG(dbgs() << *To);
+  DEBUG(dbgs() << "\n");
   auto LookupResult = MemoryAccessEquiv.find(From);
   bool Changed = false;
   // If it's already in the table, see if the value changed.