assert(0) -> LLVM_UNREACHABLE.
[oota-llvm.git] / lib / CodeGen / MachineModuleInfo.cpp
index 4bbc4dd985a77ae8466cd8bcfe3bb1886b823c17..798492bf329a9ee0ead91770cefaa5772e633245 100644 (file)
@@ -23,6 +23,7 @@
 #include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/Streams.h"
 using namespace llvm;
 using namespace llvm::dwarf;
@@ -290,7 +291,7 @@ unsigned MachineModuleInfo::getPersonalityIndex() const {
   }
 
   // This should never happen
-  assert(0 && "Personality function should be set!");
+  LLVM_UNREACHABLE("Personality function should be set!");
   return 0;
 }
 
@@ -333,7 +334,7 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) {
     // Iterate through instructions.
     for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
       // Is it a label.
-      if (I->isDebugLabel(){
+      if (I->isDebugLabel() && !MMI->isDbgLabelUsed(I->getOperand(0).getImm())){
         // The label ID # is always operand #0, an immediate.
         unsigned NextLabel = I->getOperand(0).getImm();