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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292923 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-01-24 12:26:01 +00:00
parent 1a3bde19ef
commit a49c64f182
7 changed files with 13 additions and 9 deletions

View File

@@ -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;