aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-assert.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-12-04 20:24:55 -0500
committerMike Frysinger <vapier@gentoo.org>2021-12-04 22:09:26 -0500
commit20a8e078cc573f85f7262f7b87be3cf8e8a6424f (patch)
tree3566c07524f60dfdf62b80576dc9151afb37b3e6 /sim/common/sim-assert.h
parent671fac7c4526b61143f860c4800047c3f7ff6fc4 (diff)
downloadbinutils-20a8e078cc573f85f7262f7b87be3cf8e8a6424f.zip
binutils-20a8e078cc573f85f7262f7b87be3cf8e8a6424f.tar.gz
binutils-20a8e078cc573f85f7262f7b87be3cf8e8a6424f.tar.bz2
sim: reorder header includes
We're including system headers after local headers in a bunch of places, but this leads to conflicts when our local headers happen to define symbols that show up in the system headers. Use the more standard order of: * config.h (via defs.h) * system headers * local library headers (e.g. bfd & libiberty) * sim specific headers
Diffstat (limited to 'sim/common/sim-assert.h')
-rw-r--r--sim/common/sim-assert.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/sim-assert.h b/sim/common/sim-assert.h
index c6b877b..43b0b9d 100644
--- a/sim/common/sim-assert.h
+++ b/sim/common/sim-assert.h
@@ -21,6 +21,8 @@
#ifndef SIM_ASSERT_H
#define SIM_ASSERT_H
+#include "libiberty.h"
+
/* The subtle difference between SIM_ASSERT and ASSERT is that
SIM_ASSERT passes `sd' to sim_io_error for the SIM_DESC,
ASSERT passes NULL. */
@@ -28,7 +30,6 @@
#if !defined (SIM_ASSERT)
#if defined (WITH_ASSERT)
#include "sim-io.h"
-#include "libiberty.h"
#define SIM_ASSERT(EXPRESSION) \
do \
{ \
@@ -51,7 +52,6 @@ while (0)
#if !defined (ASSERT)
#if defined (WITH_ASSERT)
#include "sim-io.h"
-#include "libiberty.h"
#define ASSERT(EXPRESSION) \
do \
{ \