diff options
author | Sean Callanan <scallanan@apple.com> | 2013-05-31 17:29:03 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2013-05-31 17:29:03 +0000 |
commit | 7d01ddd6f8fe39897f62f33746c219806a0dda29 (patch) | |
tree | ba41ee17c13484bb67b79c88cc58dea8d5e9d238 /lldb/source/Expression/IRInterpreter.cpp | |
parent | 8aa7abe2aea08bc3176aa5ede0dc3718fa8d2ff3 (diff) | |
download | bcm5719-llvm-7d01ddd6f8fe39897f62f33746c219806a0dda29.tar.gz bcm5719-llvm-7d01ddd6f8fe39897f62f33746c219806a0dda29.zip |
Fixed value evaluation to handle null constants.
<rdar://problem/14005311>
llvm-svn: 183022
Diffstat (limited to 'lldb/source/Expression/IRInterpreter.cpp')
-rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 5986ebb4a00..fa883527209 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -151,7 +151,11 @@ public: if (constant) { - if (const ConstantInt *constant_int = dyn_cast<ConstantInt>(constant)) + if (isa<ConstantPointerNull>(constant)) + { + return AssignToMatchType(scalar, 0, value->getType()); + } + else if (const ConstantInt *constant_int = dyn_cast<ConstantInt>(constant)) { return AssignToMatchType(scalar, constant_int->getLimitedValue(), value->getType()); } |