summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-05-17 22:15:08 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2019-05-17 22:16:06 +0200
commitc51b78eee4c662efc99dd3d813dbf12eac4b9052 (patch)
treeaab38ddc1da6fcaa31f26d803e1046a51e78a9b5
parentba3a2e484b321d284bbc5fbc41bd58505e12cf72 (diff)
Prevent direct inclusion of the generated nodes.h.
This fixes #14.
-rw-r--r--scripts/templates/nodes.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/templates/nodes.h b/scripts/templates/nodes.h
index 636dd8e..af18910 100644
--- a/scripts/templates/nodes.h
+++ b/scripts/templates/nodes.h
@@ -2,6 +2,10 @@
#ifndef FIRM_{{spec.name|upper}}_NODES_H
#define FIRM_{{spec.name|upper}}_NODES_H
+#ifndef FIRM_IR_IRNODE_H
+#error Do not include nodes.h directly; include irnode.h instead.
+#endif
+
{% if spec.external %}
{% set FIRM_API="" %}
#include <libfirm/firm_types.h>