Tiago Mück has submitted this change and it was merged. ( 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]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18420
Reviewed-by: Brandon Potter <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Nikos Nikoleris <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/logging.hh
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Brandon Potter: Looks good to me, approved
  Nikos Nikoleris: Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  kokoro: Regressions pass



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: 2
Gerrit-Owner: Tiago Mück <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Brandon Potter <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Tiago Mück <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to