summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/IRDynamicChecks.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-07-08 00:39:14 +0000
committerSean Callanan <scallanan@apple.com>2011-07-08 00:39:14 +0000
commit77eaf442ce46fbeb996a9af2e979088223852c09 (patch)
treeae765482c044c4b56b38921ed3de76d4911b7ff2 /lldb/source/Expression/IRDynamicChecks.cpp
parentd9761cd4662c058951945250fb5a0c5973890a9e (diff)
downloadbcm5719-llvm-77eaf442ce46fbeb996a9af2e979088223852c09.tar.gz
bcm5719-llvm-77eaf442ce46fbeb996a9af2e979088223852c09.zip
Audited the expression parser to find uninitialized
pointers. Some of the spots are obviously initialized later, but it's better just to NULL the pointers out at initialization to make the code more robust when exposed to later changes. llvm-svn: 134670
Diffstat (limited to 'lldb/source/Expression/IRDynamicChecks.cpp')
-rw-r--r--lldb/source/Expression/IRDynamicChecks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Expression/IRDynamicChecks.cpp b/lldb/source/Expression/IRDynamicChecks.cpp
index 584de69501f..09f520c731c 100644
--- a/lldb/source/Expression/IRDynamicChecks.cpp
+++ b/lldb/source/Expression/IRDynamicChecks.cpp
@@ -314,7 +314,7 @@ private:
if (!m_valid_pointer_check_func)
m_valid_pointer_check_func = BuildPointerValidatorFunc(m_checker_functions.m_valid_pointer_check->StartAddress());
- llvm::Value *dereferenced_ptr;
+ llvm::Value *dereferenced_ptr = NULL;
if (llvm::LoadInst *li = dyn_cast<llvm::LoadInst> (inst))
dereferenced_ptr = li->getPointerOperand();
@@ -382,7 +382,7 @@ private:
if (!m_objc_object_check_func)
m_objc_object_check_func = BuildPointerValidatorFunc(m_checker_functions.m_objc_object_check->StartAddress());
- llvm::Value *target_object;
+ llvm::Value *target_object = NULL;
// id objc_msgSend(id theReceiver, SEL theSelector, ...)
OpenPOWER on IntegriCloud