Kill warning
authorChris Lattner <sabre@nondot.org>
Fri, 22 Aug 2003 18:57:43 +0000 (18:57 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 22 Aug 2003 18:57:43 +0000 (18:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8056 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/BugDriver.cpp

index 398e4965e00cdcf7918417811cec931bc9dd3c2a..e950cdb18c0b6f1bb292dab611f2f8c71345d263 100644 (file)
@@ -146,7 +146,7 @@ bool BugDriver::run() {
   // was specified, make sure that the raw output matches it.  If not, it's a
   // problem in the front-end or the code generator.
   //
-  bool CreatedOutput = false, Result;
+  bool CreatedOutput = false;
   if (ReferenceOutputFile.empty()) {
     std::cout << "Generating reference output from raw program...";
     if (DebugCodegen) {
@@ -158,10 +158,14 @@ bool BugDriver::run() {
     std::cout << "Reference output is: " << ReferenceOutputFile << "\n";
   } 
 
-  if (DebugMode == DebugCompile) {
+  bool Result;
+  switch (DebugMode) {
+  default: assert(0 && "Bad value for DebugMode!");
+  case DebugCompile:
     std::cout << "\n*** Debugging miscompilation!\n";
     Result = debugMiscompilation();
-  } else { // there is only one other possible value: DebugCodegen
+    break;
+  case DebugCodegen:
     std::cout << "Debugging code generator problem!\n";
     Result = debugCodeGenerator();
   }