summaryrefslogtreecommitdiffstats
path: root/libcxx/src/experimental/filesystem/path.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-04 23:22:28 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-04 23:22:28 +0000
commite49cdfbeea99ba94ed3d8a46b9943b272dbd9c5f (patch)
tree7dc16aa7afd24344bb01d80de74782ba169461a1 /libcxx/src/experimental/filesystem/path.cpp
parent5ddaeb888d807b5512546d5f666a581afddde6cc (diff)
downloadbcm5719-llvm-e49cdfbeea99ba94ed3d8a46b9943b272dbd9c5f.tar.gz
bcm5719-llvm-e49cdfbeea99ba94ed3d8a46b9943b272dbd9c5f.zip
Recommit [libcxx] Never use <cassert> within libc++
It is my opinion that libc++ should never use `<cassert>`, including in the `dylib`. This patch remove all uses of `assert` from within libc++ and replaces most of them with `_LIBCPP_ASSERT` instead. Additionally this patch turn `LIBCXX_ENABLE_ASSERTIONS` off by default, because the standard library should not be aborting user programs unless explicitly asked to. llvm-svn: 294107
Diffstat (limited to 'libcxx/src/experimental/filesystem/path.cpp')
-rw-r--r--libcxx/src/experimental/filesystem/path.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/libcxx/src/experimental/filesystem/path.cpp b/libcxx/src/experimental/filesystem/path.cpp
index 96b81f7b0a7..daf2c2bba79 100644
--- a/libcxx/src/experimental/filesystem/path.cpp
+++ b/libcxx/src/experimental/filesystem/path.cpp
@@ -6,11 +6,9 @@
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
-#undef NDEBUG
#include "experimental/filesystem"
#include "string_view"
#include "utility"
-#include "cassert"
namespace { namespace parser
{
@@ -113,7 +111,6 @@ public:
void decrement() noexcept {
const PosPtr REnd = &Path.front() - 1;
const PosPtr RStart = getCurrentTokenStartPos() - 1;
- assert(RStart != REnd);
switch (State) {
case PS_AtEnd: {
@@ -322,7 +319,6 @@ 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;
OpenPOWER on IntegriCloud