Create multilevel debug mode

llvm-svn: 139913
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: cec9af9ead1269be5a17a7d81ba55173d74c9d21
diff --git a/include/__debug b/include/__debug
index e7d027a..4e80c6f 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_END_NAMESPACE_STD
 
+#endif
+
 #endif  // _LIBCPP_DEBUG_H