Tiago Mück has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/18420

Change subject: base: Add warn_if_once macro
......................................................................

base: Add warn_if_once macro

Change-Id: Ie68f3b07a35ed2e6b0eee20b3b34050542fcdc6c
Signed-off-by: Tiago Muck <[email protected]>
---
M src/base/logging.hh
1 file changed, 7 insertions(+), 1 deletion(-)



diff --git a/src/base/logging.hh b/src/base/logging.hh
index 1c504d2..7040037 100644
--- a/src/base/logging.hh
+++ b/src/base/logging.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2017 ARM Limited
+ * Copyright (c) 2014, 2017, 2019 ARM Limited
  * All rights reserved
  *
  * The license below extends only to copyright in the software and shall
@@ -231,6 +231,12 @@
             warn(__VA_ARGS__); \
     } while (0)

+#define warn_if_once(cond, ...) \
+    do { \
+        if ((cond)) \
+            warn_once(__VA_ARGS__); \
+    } while (0)
+
 /**
* The chatty assert macro will function like a normal assert, but will allow * the specification of additional, helpful material to aid debugging why the

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/18420
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ie68f3b07a35ed2e6b0eee20b3b34050542fcdc6c
Gerrit-Change-Number: 18420
Gerrit-PatchSet: 1
Gerrit-Owner: Tiago Mück <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to