summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-07-01 11:09:15 +0000
committerPavel Labath <pavel@labath.sk>2019-07-01 11:09:15 +0000
commit0f73709cb7166c74c491a4dbdb32ec81c1990a3a (patch)
tree8270fe9fc3fbbe0260a5c87ca6fdefd7f0452e2a /lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
parented13fef47741d0a8fcaefeedbe6dc47a8552b928 (diff)
downloadbcm5719-llvm-0f73709cb7166c74c491a4dbdb32ec81c1990a3a.tar.gz
bcm5719-llvm-0f73709cb7166c74c491a4dbdb32ec81c1990a3a.zip
Remove null checks of results of new expressions
operator new doesn't return a null pointer, even if one turns off exceptions (it calls std::terminate instead). Therefore, all of this is dead code. llvm-svn: 364744
Diffstat (limited to 'lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp')
-rw-r--r--lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
index 69b56242c86..820d280c37f 100644
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
+++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
@@ -830,8 +830,7 @@ bool RegisterContextDarwin_i386::WriteRegister(const RegisterInfo *reg_info,
bool RegisterContextDarwin_i386::ReadAllRegisterValues(
lldb::DataBufferSP &data_sp) {
data_sp = std::make_shared<DataBufferHeap>(REG_CONTEXT_SIZE, 0);
- if (data_sp && ReadGPR(false) == 0 && ReadFPU(false) == 0 &&
- ReadEXC(false) == 0) {
+ if (ReadGPR(false) == 0 && ReadFPU(false) == 0 && ReadEXC(false) == 0) {
uint8_t *dst = data_sp->GetBytes();
::memcpy(dst, &gpr, sizeof(gpr));
dst += sizeof(gpr);
OpenPOWER on IntegriCloud