[polly] r309856 - Replace asserts with llvm_unreachable to clarify intent

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 12:11:46 PDT 2017


Author: grosser
Date: Wed Aug  2 12:11:46 2017
New Revision: 309856

URL: http://llvm.org/viewvc/llvm-project?rev=309856&view=rev
Log:
Replace asserts with llvm_unreachable to clarify intent

Modified:
    polly/trunk/lib/Support/RegisterPasses.cpp

Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=309856&r1=309855&r2=309856&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Wed Aug  2 12:11:46 2017
@@ -464,7 +464,7 @@ static void buildDefaultPollyPipeline(Fu
     case OPTIMIZER_NONE:
       break; /* Do nothing */
     case OPTIMIZER_ISL:
-      assert("ISL optimizer is not implemented");
+      llvm_unreachable("ISL optimizer is not implemented");
       break;
     }
 
@@ -482,7 +482,7 @@ static void buildDefaultPollyPipeline(Fu
   }
 #ifdef GPU_CODEGEN
   else
-    assert("Hybrid Target with GPU support is not implemented");
+    llvm_unreachable("Hybrid Target with GPU support is not implemented");
 #endif
 
   PM.addPass(CodePreparationPass());




More information about the llvm-commits mailing list