aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2022-05-17 08:21:09 -0700
committerJim Ingham <jingham@apple.com>2022-05-17 08:22:30 -0700
commit7afd257ff8a45a348767b4432abc6f4f105fc376 (patch)
tree9a15683a94e3e4691d16bf20ec4b05f9c7fdb794 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf032690a7c0b221b27bfb79ffec85147f23d520f (diff)
downloadllvm-7afd257ff8a45a348767b4432abc6f4f105fc376.zip
llvm-7afd257ff8a45a348767b4432abc6f4f105fc376.tar.gz
llvm-7afd257ff8a45a348767b4432abc6f4f105fc376.tar.bz2
Fix the std::string formatter to report errors in the case where the
string points to unaccessible memory. The formatter tries to get the data field of the std::string, and to check whether that fails it just checks that the ValueObjectSP returned is not empty. But we never return empty ValueObjectSP's to indicate failure, since doing so would lose the Error object that tells you why fetching the ValueObject failed. This patch adds a check for ValueObject::GetError().Success(). I also added a test case for this failure, and reworked the test case a bit (to use run_to_source_breakpoint). I also renamed a couple of single letter locals which don't follow the lldb coding conventions. Differential Revision: https://reviews.llvm.org/D108228
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions