[llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Aug 22 19:57:39 PDT 2003


Changes in directory llvm/tools/bugpoint:

BugDriver.cpp updated: 1.13 -> 1.14

---
Log message:

Kill warning


---
Diffs of the changes:

Index: llvm/tools/bugpoint/BugDriver.cpp
diff -u llvm/tools/bugpoint/BugDriver.cpp:1.13 llvm/tools/bugpoint/BugDriver.cpp:1.14
--- llvm/tools/bugpoint/BugDriver.cpp:1.13	Thu Aug 21 22:35:24 2003
+++ llvm/tools/bugpoint/BugDriver.cpp	Fri Aug 22 13:57:43 2003
@@ -146,7 +146,7 @@
   // 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 @@
     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();
   }





More information about the llvm-commits mailing list