Use report_fatal_error instead of unreachable for -fast-isel-abort
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 4 Mar 2015 01:48:39 +0000 (01:48 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 4 Mar 2015 01:48:39 +0000 (01:48 +0000)
Suggestion by Andrea Di Biagio

From: Mehdi Amini <mehdi.amini@apple.com>

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

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index d015b0b0dd062f8b18ff1aee86aa40b44a1d3447..d8b79ac476ab1d342923c3c9c26ac015550047cb 100644 (file)
@@ -1182,7 +1182,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
           // Fast isel failed to lower these arguments
           ++NumFastIselFailLowerArguments;
           if (EnableFastISelAbort > 1)
-            llvm_unreachable("FastISel didn't lower all arguments");
+            report_fatal_error("FastISel didn't lower all arguments");
 
           // Use SelectionDAG argument lowering
           LowerArguments(Fn);
@@ -1254,7 +1254,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
           if (EnableFastISelAbort > 2)
             // FastISel selector couldn't handle something and bailed.
             // For the purpose of debugging, just abort.
-            llvm_unreachable("FastISel didn't select the entire block");
+            report_fatal_error("FastISel didn't select the entire block");
 
           if (!Inst->getType()->isVoidTy() && !Inst->use_empty()) {
             unsigned &R = FuncInfo->ValueMap[Inst];
@@ -1297,7 +1297,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
         if (ShouldAbort)
           // FastISel selector couldn't handle something and bailed.
           // For the purpose of debugging, just abort.
-          llvm_unreachable("FastISel didn't select the entire block");
+          report_fatal_error("FastISel didn't select the entire block");
 
         NumFastIselFailures += NumFastIselRemaining;
         break;