aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-03-22 13:29:55 -0700
committerEric Anholt <[email protected]>2013-06-21 10:04:28 -0700
commitd0abac22c3d963a0f02a41c7527fbb18071ea7c4 (patch)
tree946d740d15d4f2c449331db1fdd178fdd92be0fe
parent2d7e837716f3b91c694acbc6a986a0b27fe19f2d (diff)
glsl: Make some files safe to include from C
Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/glsl/ir.h4
-rw-r--r--src/glsl/ir_hierarchical_visitor.h2
-rw-r--r--src/glsl/ir_visitor.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 6d4150136cd..94426812bbd 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -36,6 +36,8 @@
#include "ir_hierarchical_visitor.h"
#include "main/mtypes.h"
+#ifdef __cplusplus
+
/**
* \defgroup IR Intermediate representation nodes
*
@@ -2050,4 +2052,6 @@ extern char *
prototype_string(const glsl_type *return_type, const char *name,
exec_list *parameters);
+#endif /* __cplusplus */
+
#endif /* IR_H */
diff --git a/src/glsl/ir_hierarchical_visitor.h b/src/glsl/ir_hierarchical_visitor.h
index 143eb7c8878..1988ad0910b 100644
--- a/src/glsl/ir_hierarchical_visitor.h
+++ b/src/glsl/ir_hierarchical_visitor.h
@@ -36,6 +36,7 @@ enum ir_visitor_status {
};
+#ifdef __cplusplus
/**
* Base class of hierarchical visitors of IR instruction trees
*
@@ -181,5 +182,6 @@ void visit_tree(ir_instruction *ir,
ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l,
bool statement_list = true);
+#endif /* __cplusplus */
#endif /* IR_HIERARCHICAL_VISITOR_H */
diff --git a/src/glsl/ir_visitor.h b/src/glsl/ir_visitor.h
index 4a00155be2f..bd47ef7d5fa 100644
--- a/src/glsl/ir_visitor.h
+++ b/src/glsl/ir_visitor.h
@@ -26,6 +26,7 @@
#ifndef IR_VISITOR_H
#define IR_VISITOR_H
+#ifdef __cplusplus
/**
* Abstract base class of visitors of IR instruction trees
*/
@@ -81,5 +82,6 @@ public:
virtual void visit(class ir_constant *) {}
virtual void visit(class ir_call *) {}
};
+#endif /* __cplusplus */
#endif /* IR_VISITOR_H */