aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/PredicateInfo.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-07 21:51:58 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-07 21:51:58 +0000
commitc0d5590a3b908ce583b9e24099b5028026a93456 (patch)
tree8b6bfa510d73432a4361f45f2c07bf889516d929 /llvm/lib/Transforms/Utils/PredicateInfo.cpp
parenta2c2d94dcbc589061d52faafbf1cb6f46ce46666 (diff)
downloadllvm-c0d5590a3b908ce583b9e24099b5028026a93456.zip
llvm-c0d5590a3b908ce583b9e24099b5028026a93456.tar.gz
llvm-c0d5590a3b908ce583b9e24099b5028026a93456.tar.bz2
Fix bugs in filesystem detected by _LIBCPP_ASSERT.
Recently I turned on libc++'s debug mode assertions when CMake is configured with -DLIBCXX_ENABLE_ASSERTIONS=ON. This change exposed assertion failures caused by bugs in filesystem. This patch fixes those failures. The first bug was that `PathParser` was using front()/back() on empty string views in order to get the address of the character. However this is UB on empty strings. Those operations now use data() to obtain the pointer. The second bug was that directory_iterator attempted to capture errno when it was unset and there was an assertion to detect this. llvm-svn: 294360
Diffstat (limited to 'llvm/lib/Transforms/Utils/PredicateInfo.cpp')
0 files changed, 0 insertions, 0 deletions