feat(cbmc): add macros to conditionally compile code blocks

Change-Id: I289a972f1d2f80085127dd6ea963cc2e9a9dd7bd
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
diff --git a/lib/common/include/utils_def.h b/lib/common/include/utils_def.h
index 5326a3c..bd763cc 100644
--- a/lib/common/include/utils_def.h
+++ b/lib/common/include/utils_def.h
@@ -234,6 +234,18 @@
 
 #define FALLTHROUGH	__attribute__((fallthrough))
 
+/*
+ * Helper macros for making code parts to be conditionally compiled, depending
+ * on the current build being a CBMC build or not.
+ */
+#ifdef CBMC
+#define IF_NCBMC(x)
+#define IF_CBMC(x)	x
+#else /* CBMC */
+#define IF_NCBMC(x)	x
+#define IF_CBMC(x)
+#endif /* CBMC */
+
 #endif /* !(defined(__ASSEMBLER__) || defined(__LINKER__)) */
 
 #endif /* UTILS_DEF_H */