[llvm] r267312 - Fix a couple assertions that can never fire because they just contained the text string which always evaluates to true. Add a ! so they'll evaluate to false.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 23 19:01:26 PDT 2016


Author: ctopper
Date: Sat Apr 23 21:01:25 2016
New Revision: 267312

URL: http://llvm.org/viewvc/llvm-project?rev=267312&view=rev
Log:
Fix a couple assertions that can never fire because they just contained the text string which always evaluates to true. Add a ! so they'll evaluate to false.

Modified:
    llvm/trunk/lib/Target/AMDGPU/SIMachineScheduler.cpp
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SIMachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIMachineScheduler.cpp?rev=267312&r1=267311&r2=267312&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIMachineScheduler.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIMachineScheduler.cpp Sat Apr 23 21:01:25 2016
@@ -544,7 +544,7 @@ void SIScheduleBlock::addSucc(SISchedule
 #ifndef NDEBUG
   for (SIScheduleBlock* P : Preds) {
     if (SuccID == P->getID())
-      assert("Loop in the Block Graph!\n");
+      assert(!"Loop in the Block Graph!\n");
   }
 #endif
 }

Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp?rev=267312&r1=267311&r2=267312&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp Sat Apr 23 21:01:25 2016
@@ -211,7 +211,7 @@ void HexagonInstPrinter::printSymbol(MCI
     printOperand(MI, OpNo, O);
   } else {
     printOperand(MI, OpNo, O);
-    assert("Unknown symbol operand");
+    assert(!"Unknown symbol operand");
   }
   O << ')';
 }




More information about the llvm-commits mailing list