Transform an occurrence of if(...) { assert (0) }.
authorBrian Gaeke <gaeke@uiuc.edu>
Sun, 30 May 2004 07:34:01 +0000 (07:34 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Sun, 30 May 2004 07:34:01 +0000 (07:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13908 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9InstrInfo.cpp

index b6d580622fe6f854a2298921e59fe64623732142..af5f69a3e7c3a5f7db6b7b4ee823a3fb6e024e38 100644 (file)
@@ -676,10 +676,8 @@ SparcV9InstrInfo::CreateCopyInstructionsByType(const TargetMachine& target,
   const Type* resultType = dest->getType();
   
   MachineOpCode opCode = ChooseAddInstructionByType(resultType);
-  if (opCode == V9::INVALID_OPCODE) {
-    assert(0 && "Unsupported result type in CreateCopyInstructionsByType()");
-    return;
-  }
+  assert (opCode != V9::INVALID_OPCODE
+          && "Unsupported result type in CreateCopyInstructionsByType()");
   
   // if `src' is a constant that doesn't fit in the immed field or if it is
   // a global variable (i.e., a constant address), generate a load