aboutsummaryrefslogtreecommitdiff
path: root/profiling/common/include/Assert.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/common/include/Assert.hpp')
-rw-r--r--profiling/common/include/Assert.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/profiling/common/include/Assert.hpp b/profiling/common/include/Assert.hpp
new file mode 100644
index 0000000000..c6e8bc49d4
--- /dev/null
+++ b/profiling/common/include/Assert.hpp
@@ -0,0 +1,24 @@
+//
+// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include <cassert>
+
+namespace arm
+{
+
+namespace pipe
+{
+
+#ifndef NDEBUG
+# define ARM_PIPE_ASSERT(COND) assert(COND)
+# define ARM_PIPE_ASSERT_MSG(COND, MSG) assert((COND) && MSG)
+#else
+# define ARM_PIPE_ASSERT(COND)
+# define ARM_PIPE_ASSERT_MSG(COND, MSG)
+#endif
+} // namespace pipe
+} //namespace arm \ No newline at end of file