]> git.saurik.com Git - apple/system_cmds.git/blobdiff - CPPUtil/UtilAssert.hpp
system_cmds-735.tar.gz
[apple/system_cmds.git] / CPPUtil / UtilAssert.hpp
diff --git a/CPPUtil/UtilAssert.hpp b/CPPUtil/UtilAssert.hpp
deleted file mode 100644 (file)
index f7a0d57..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-//  Assert.hpp
-//  CPPUtil
-//
-//  Created by James McIlree on 4/7/13.
-//  Copyright (c) 2013 Apple. All rights reserved.
-//
-
-#ifndef CPPUtil_Assert_hpp
-#define CPPUtil_Assert_hpp
-
-#if !defined(NDEBUG) && !defined(NS_BLOCK_ASSERTIONS)
-
-        #define DEBUG_ONLY( statement ) statement
-
-        #define        ASSERT(e, d)                                                                                            \
-        {                                                                                                              \
-                if (__builtin_expect(!(e), 0)) {                                                                       \
-                        ::printf("ASSERT(%s) %s %d, %s\n", #e, util::Path::basename((char*)__FILE__).c_str(), __LINE__, d);    \
-                        std::abort();                                                                                  \
-                }                                                                                                      \
-        }
-
-        #define SHOULD_NOT_REACH_HERE(d)                                                                               \
-        {                                                                                                              \
-                ::printf("SHOULD_NOT_REACH_HERE %s %d, %s\n", util::Path::basename((char*)__FILE__).c_str(), __LINE__, d);     \
-               std::abort();                                                                                           \
-        }
-
-        #define TrueInDebug true
-
-#else
-
-        #define DEBUG_ONLY( statement )
-        #define        ASSERT(e, d)
-        #define SHOULD_NOT_REACH_HERE(d)
-
-        #define TrueInDebug false
-
-#endif
-
-#define        GUARANTEE(e)                                                                                            \
-{                                                                                                              \
-       if (__builtin_expect(!(e), 0)) {                                                                        \
-               ::printf("ASSERT(%s) %s %d\n", #e, util::Path::basename((char*)__FILE__).c_str(), __LINE__);    \
-               std::abort();                                                                                   \
-       }                                                                                                       \
-}
-
-#endif