Add a default case to the LLVM expression opcode switch statement
- better than failing silently next time the DWARF standard introduces new opcodes!
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187449 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/DWARFExpression.cpp b/source/Expression/DWARFExpression.cpp
index fc955c5..7f2f2e1 100644
--- a/source/Expression/DWARFExpression.cpp
+++ b/source/Expression/DWARFExpression.cpp
@@ -11,6 +11,8 @@
#include <vector>
+#include "llvm/Support/ErrorHandling.h"
+
#include "lldb/Core/DataEncoder.h"
#include "lldb/Core/dwarf.h"
#include "lldb/Core/Log.h"
@@ -2659,6 +2661,8 @@
return false;
}
break;
+ default:
+ llvm::report_fatal_error("Unhandled DWARF expression opcode! Please file a bug at llvm.org/bugs and attach the binary you were debugging.");
}
}