diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-01-24 12:26:01 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-01-24 12:26:01 +0000 |
commit | f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85 (patch) | |
tree | 6fa1b57f29c142590a431e68a822da7b3fe2a9ec /libcxx/src/experimental/filesystem/path.cpp | |
parent | 819da50d12c24b41c974d405319fbdb82e2c4229 (diff) | |
download | bcm5719-llvm-f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85.tar.gz bcm5719-llvm-f9e7bf3a43fd28c9ffd1523f1c832275e80a9f85.zip |
Revert "[libcxx] Never use <cassert> within libc++"
This reverts commit r292883. Unfortunately <string_view> uses
_LIBCPP_ASSERT in a way which is not compatible with the C++11 dylib
build. I'll investigate more tomorrow.
llvm-svn: 292923
Diffstat (limited to 'libcxx/src/experimental/filesystem/path.cpp')
-rw-r--r-- | libcxx/src/experimental/filesystem/path.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/src/experimental/filesystem/path.cpp b/libcxx/src/experimental/filesystem/path.cpp index daf2c2bba79..96b81f7b0a7 100644 --- a/libcxx/src/experimental/filesystem/path.cpp +++ b/libcxx/src/experimental/filesystem/path.cpp @@ -6,9 +6,11 @@ // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +#undef NDEBUG #include "experimental/filesystem" #include "string_view" #include "utility" +#include "cassert" namespace { namespace parser { @@ -111,6 +113,7 @@ public: void decrement() noexcept { const PosPtr REnd = &Path.front() - 1; const PosPtr RStart = getCurrentTokenStartPos() - 1; + assert(RStart != REnd); switch (State) { case PS_AtEnd: { @@ -319,6 +322,7 @@ string_view_t path::__root_path_raw() const auto NextCh = PP.peek(); if (NextCh && *NextCh == '/') { ++PP; + assert(PP.State == PathParser::PS_InRootDir); return createView(__pn_.data(), &PP.RawEntry.back()); } return PP.RawEntry; |