summaryrefslogtreecommitdiff
path: root/include/__debug
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-09-16 17:29:17 +0000
committerHoward Hinnant <hhinnant@apple.com>2011-09-16 17:29:17 +0000
commitabe2628b43f13fd81fb90b43dc14472f88b927cc (patch)
tree2fb5fdaead7901e0363a945afd6219e28ba1cd61 /include/__debug
parent7a563db09ab5bec75c9f132958cc269032eb2862 (diff)
downloadlibcxx-abe2628b43f13fd81fb90b43dc14472f88b927cc.tar.gz
Create multilevel debug mode
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/__debug')
-rw-r--r--include/__debug8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/__debug b/include/__debug
index e7d027add..4e80c6f8d 100644
--- a/include/__debug
+++ b/include/__debug
@@ -11,11 +11,17 @@
#ifndef _LIBCPP_DEBUG_H
#define _LIBCPP_DEBUG_H
+#if _LIBCPP_DEBUG_LEVEL >= 1
+
# include <cstdlib>
# include <cstdio>
# include <cstddef>
# define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort()))
+#endif
+
+#if _LIBCPP_DEBUG_LEVEL >= 2
+
_LIBCPP_BEGIN_NAMESPACE_STD
struct _LIBCPP_VISIBLE __c_node;
@@ -177,5 +183,7 @@ _LIBCPP_VISIBLE const __libcpp_db* __get_const_db();
_LIBCPP_END_NAMESPACE_STD
+#endif
+
#endif // _LIBCPP_DEBUG_H