From bbbb8345ab9df2d634dc2a34d257ee2cbf930292 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sun, 11 Sep 2011 16:10:33 -0500 Subject: ir_to_mesa: Move some things outside the 'extern "C"' blocks Having a few of these includes or forward declarations inside the 'extern "C"' block can cause problems later. Specifically, it prevents C++ linkage functions from being added to ir_to_mesa.h and makes G++ angry if 'struct foo' is seen both inside and outside an 'extern "C"'. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/glsl/ir_clone.cpp | 2 -- src/glsl/ir_print_visitor.cpp | 3 --- src/glsl/ir_set_program_inouts.cpp | 2 -- 3 files changed, 7 deletions(-) (limited to 'src/glsl') diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index c1befa95ce9..9adf47050d1 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -25,9 +25,7 @@ #include "main/compiler.h" #include "ir.h" #include "glsl_types.h" -extern "C" { #include "program/hash_table.h" -} /** * Duplicate an IR variable diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index ea7858224bb..b713bd03ba0 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -24,10 +24,7 @@ #include "ir_print_visitor.h" #include "glsl_types.h" #include "glsl_parser_extras.h" - -extern "C" { #include "program/hash_table.h" -} static void print_type(const glsl_type *t); diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index 3b10b909724..ae3ef74c75e 100644 --- a/src/glsl/ir_set_program_inouts.cpp +++ b/src/glsl/ir_set_program_inouts.cpp @@ -34,10 +34,8 @@ * from the GLSL IR. */ -extern "C" { #include "main/core.h" /* for struct gl_program */ #include "program/hash_table.h" -} #include "ir.h" #include "ir_visitor.h" #include "glsl_types.h" -- cgit v1.2.3