summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
diff options
context:
space:
mode:
authorOmair Javaid <omair.javaid@linaro.org>2015-12-14 14:52:07 +0000
committerOmair Javaid <omair.javaid@linaro.org>2015-12-14 14:52:07 +0000
commitaf9a31aff325fb8f1026891f44ffa3b9259d5289 (patch)
treee3171edfc79ea115657e3134b4fad5497c0bff6a /lldb/source/Utility
parent6200a3d0f3a545798a0a3abd11ae287a86c9b713 (diff)
downloadbcm5719-llvm-af9a31aff325fb8f1026891f44ffa3b9259d5289.tar.gz
bcm5719-llvm-af9a31aff325fb8f1026891f44ffa3b9259d5289.zip
Add failure paths to a few JSONNumber members
Differential revision: http://reviews.llvm.org/D15355 llvm-svn: 255499
Diffstat (limited to 'lldb/source/Utility')
-rw-r--r--lldb/source/Utility/JSON.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Utility/JSON.cpp b/lldb/source/Utility/JSON.cpp
index 8804371b31f..8b96a06e08e 100644
--- a/lldb/source/Utility/JSON.cpp
+++ b/lldb/source/Utility/JSON.cpp
@@ -12,6 +12,7 @@
#include <limits.h>
#include "lldb/Core/StreamString.h"
#include "lldb/Host/StringConvert.h"
+#include "llvm/Support/ErrorHandling.h"
using namespace lldb_private;
@@ -72,9 +73,10 @@ JSONNumber::GetAsUnsigned() const
case DataType::Double:
return (uint64_t)m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
-uint64_t
+int64_t
JSONNumber::GetAsSigned() const
{
switch (m_data_type)
@@ -86,6 +88,7 @@ JSONNumber::GetAsSigned() const
case DataType::Double:
return (int64_t)m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
double
@@ -100,6 +103,7 @@ JSONNumber::GetAsDouble() const
case DataType::Double:
return m_data.m_double;
}
+ llvm_unreachable("Unhandled data type");
}
void
OpenPOWER on IntegriCloud