summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-22 10:38:52 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-22 12:30:55 -0700
commitac95f2f8c88d39aaa878f61172d9748af13e2c80 (patch)
tree6fb453ee5a6ddb7275b2a1099804e9e91db44dcf
parentb302359394312112a61aec58c99be9ffc3406c92 (diff)
Include stdio.h and stdlib.h everywhere, and don't cook our own #define NULL.
-rw-r--r--ast_function.cpp1
-rw-r--r--ast_to_hir.cpp2
-rw-r--r--hir_field_selection.cpp4
-rw-r--r--ir.h3
-rw-r--r--ir_basic_block.cpp1
-rw-r--r--ir_constant_expression.cpp1
-rw-r--r--ir_constant_folding.cpp1
-rw-r--r--ir_constant_variable.cpp2
-rw-r--r--ir_copy_propagation.cpp1
-rw-r--r--ir_dead_code.cpp1
-rw-r--r--ir_dead_code_local.cpp1
-rw-r--r--ir_expression_flattening.cpp1
-rw-r--r--ir_function_can_inline.cpp1
-rw-r--r--ir_function_inlining.cpp1
-rw-r--r--ir_hierarchical_visitor.cpp2
-rw-r--r--ir_hv_accept.cpp2
-rw-r--r--ir_if_simplification.cpp1
-rw-r--r--ir_print_visitor.cpp2
-rw-r--r--ir_reader.cpp2
-rw-r--r--ir_swizzle_swizzle.cpp1
-rw-r--r--ir_variable.cpp3
-rw-r--r--ir_vec_index_to_swizzle.cpp1
22 files changed, 11 insertions, 24 deletions
diff --git a/ast_function.cpp b/ast_function.cpp
index 279c45e..2605097 100644
--- a/ast_function.cpp
+++ b/ast_function.cpp
@@ -21,7 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
#include "glsl_symbol_table.h"
#include "ast.h"
#include "glsl_types.h"
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index dbc3666..aa90d4b 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -48,7 +48,7 @@
* As a result, my preference is to put as little C code as possible in the
* parser (and lexer) sources.
*/
-#include <stdio.h>
+
#include "main/imports.h"
#include "glsl_symbol_table.h"
#include "glsl_parser_extras.h"
diff --git a/hir_field_selection.cpp b/hir_field_selection.cpp
index f0be84d..e60ea30 100644
--- a/hir_field_selection.cpp
+++ b/hir_field_selection.cpp
@@ -20,13 +20,13 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <stdio.h>
+
+#include "ir.h"
#include "main/imports.h"
#include "symbol_table.h"
#include "glsl_parser_extras.h"
#include "ast.h"
#include "glsl_types.h"
-#include "ir.h"
struct ir_rvalue *
_mesa_ast_field_selection_to_hir(const ast_expression *expr,
diff --git a/ir.h b/ir.h
index 33b6069..d99453c 100644
--- a/ir.h
+++ b/ir.h
@@ -26,6 +26,9 @@
#ifndef IR_H
#define IR_H
+#include <cstdio>
+#include <cstdlib>
+
#include "list.h"
#include "ir_visitor.h"
#include "ir_hierarchical_visitor.h"
diff --git a/ir_basic_block.cpp b/ir_basic_block.cpp
index 2cf3704..f9953ea 100644
--- a/ir_basic_block.cpp
+++ b/ir_basic_block.cpp
@@ -27,7 +27,6 @@
* Basic block analysis of instruction streams.
*/
-#include <stdio.h>
#include "ir.h"
#include "ir_visitor.h"
#include "ir_basic_block.h"
diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp
index 5bb5920..e9f0499 100644
--- a/ir_constant_expression.cpp
+++ b/ir_constant_expression.cpp
@@ -33,7 +33,6 @@
* * Initializers for \c const variables
*/
-#define NULL 0
#include <math.h>
#include "ir.h"
#include "ir_visitor.h"
diff --git a/ir_constant_folding.cpp b/ir_constant_folding.cpp
index 5dc4a7d..342d027 100644
--- a/ir_constant_folding.cpp
+++ b/ir_constant_folding.cpp
@@ -26,7 +26,6 @@
* Replace constant-valued expressions with references to constant values.
*/
-#define NULL 0
#include "ir.h"
#include "ir_visitor.h"
#include "ir_optimization.h"
diff --git a/ir_constant_variable.cpp b/ir_constant_variable.cpp
index 7210c17..a905474 100644
--- a/ir_constant_variable.cpp
+++ b/ir_constant_variable.cpp
@@ -32,8 +32,6 @@
* and calls to builtin functions.
*/
-#include <stdio.h>
-#include <stdlib.h>
#include "ir.h"
#include "ir_print_visitor.h"
#include "ir_visitor.h"
diff --git a/ir_copy_propagation.cpp b/ir_copy_propagation.cpp
index 1c5c10d..da59981 100644
--- a/ir_copy_propagation.cpp
+++ b/ir_copy_propagation.cpp
@@ -32,7 +32,6 @@
* help anyway by triggering other optimizations that live in the HIR.
*/
-#include <stdio.h>
#include "ir.h"
#include "ir_visitor.h"
#include "ir_print_visitor.h"
diff --git a/ir_dead_code.cpp b/ir_dead_code.cpp
index 2ede7ff..8465d86 100644
--- a/ir_dead_code.cpp
+++ b/ir_dead_code.cpp
@@ -27,7 +27,6 @@
* Eliminates dead assignments and variable declarations from the code.
*/
-#define NULL 0
#include "ir.h"
#include "ir_visitor.h"
#include "ir_expression_flattening.h"
diff --git a/ir_dead_code_local.cpp b/ir_dead_code_local.cpp
index e83b300..344a6eb 100644
--- a/ir_dead_code_local.cpp
+++ b/ir_dead_code_local.cpp
@@ -33,7 +33,6 @@
* for assignments to variables that are never read.
*/
-#include <stdio.h>
#include "ir.h"
#include "ir_print_visitor.h"
#include "ir_basic_block.h"
diff --git a/ir_expression_flattening.cpp b/ir_expression_flattening.cpp
index 394a0d0..3089f17 100644
--- a/ir_expression_flattening.cpp
+++ b/ir_expression_flattening.cpp
@@ -33,7 +33,6 @@
* instruction stream.
*/
-#define NULL 0
#include "ir.h"
#include "ir_visitor.h"
#include "ir_expression_flattening.h"
diff --git a/ir_function_can_inline.cpp b/ir_function_can_inline.cpp
index 3be3510..5761a74 100644
--- a/ir_function_can_inline.cpp
+++ b/ir_function_can_inline.cpp
@@ -33,7 +33,6 @@
* (0) loop surrounding the function body.
*/
-#define NULL 0
#include "ir.h"
class ir_function_can_inline_visitor : public ir_hierarchical_visitor {
diff --git a/ir_function_inlining.cpp b/ir_function_inlining.cpp
index a501c81..4e5604f 100644
--- a/ir_function_inlining.cpp
+++ b/ir_function_inlining.cpp
@@ -27,7 +27,6 @@
* Replaces calls to functions with the body of the function.
*/
-#define NULL 0
#include "ir.h"
#include "ir_visitor.h"
#include "ir_function_inlining.h"
diff --git a/ir_hierarchical_visitor.cpp b/ir_hierarchical_visitor.cpp
index fd77391..11d30b4 100644
--- a/ir_hierarchical_visitor.cpp
+++ b/ir_hierarchical_visitor.cpp
@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#define NULL 0
+
#include "ir.h"
#include "ir_hierarchical_visitor.h"
diff --git a/ir_hv_accept.cpp b/ir_hv_accept.cpp
index 7c1798a..5432633 100644
--- a/ir_hv_accept.cpp
+++ b/ir_hv_accept.cpp
@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#define NULL 0
+
#include "ir.h"
/**
diff --git a/ir_if_simplification.cpp b/ir_if_simplification.cpp
index 042d0b6..6882ef7 100644
--- a/ir_if_simplification.cpp
+++ b/ir_if_simplification.cpp
@@ -28,7 +28,6 @@
* instruction stream.
*/
-#define NULL 0
#include "ir.h"
class ir_if_simplification_visitor : public ir_hierarchical_visitor {
diff --git a/ir_print_visitor.cpp b/ir_print_visitor.cpp
index 18ff48c..40fac88 100644
--- a/ir_print_visitor.cpp
+++ b/ir_print_visitor.cpp
@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
+
#include "ir_print_visitor.h"
#include "glsl_types.h"
#include "glsl_parser_extras.h"
diff --git a/ir_reader.cpp b/ir_reader.cpp
index 5cbce33..a8ccb30 100644
--- a/ir_reader.cpp
+++ b/ir_reader.cpp
@@ -20,7 +20,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
-#include <cstdio>
+
#include <cstdarg>
extern "C" {
diff --git a/ir_swizzle_swizzle.cpp b/ir_swizzle_swizzle.cpp
index 8873bef..0ffb4fa 100644
--- a/ir_swizzle_swizzle.cpp
+++ b/ir_swizzle_swizzle.cpp
@@ -27,7 +27,6 @@
* Eliminates the second swizzle in a swizzle chain.
*/
-#include <stdio.h>
#include "ir.h"
#include "ir_visitor.h"
#include "ir_optimization.h"
diff --git a/ir_variable.cpp b/ir_variable.cpp
index 0c0d127..49d8e3d 100644
--- a/ir_variable.cpp
+++ b/ir_variable.cpp
@@ -21,10 +21,9 @@
* DEALINGS IN THE SOFTWARE.
*/
-#include <stdio.h>
+#include "ir.h"
#include "glsl_parser_extras.h"
#include "glsl_symbol_table.h"
-#include "ir.h"
#include "builtin_variables.h"
#ifndef Elements
diff --git a/ir_vec_index_to_swizzle.cpp b/ir_vec_index_to_swizzle.cpp
index f0900cf..cb2f6ca 100644
--- a/ir_vec_index_to_swizzle.cpp
+++ b/ir_vec_index_to_swizzle.cpp
@@ -29,7 +29,6 @@
* and codegen backends not have to worry about this case.
*/
-#include <stdio.h>
#include "ir.h"
#include "ir_visitor.h"
#include "ir_optimization.h"