Mesa (master): glsl: resolve extern C workarounds/hacks

Emil Velikov evelikov at kemper.freedesktop.org
Tue Feb 21 19:05:04 UTC 2017


Module: Mesa
Branch: master
Commit: 7fcbb1a902f3e4ce9f4d93d8b628729431f0f6fc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7fcbb1a902f3e4ce9f4d93d8b628729431f0f6fc

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Thu Feb 16 15:16:37 2017 +0000

glsl: resolve extern C workarounds/hacks

Do not wrap header inclusion in extern C since it can cause issues.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/compiler/glsl/blob.h              | 8 ++++----
 src/compiler/glsl/glsl_symbol_table.h | 2 --
 src/compiler/glsl/ir_print_visitor.h  | 2 --
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/compiler/glsl/blob.h b/src/compiler/glsl/blob.h
index 0765bf3..81b9917 100644
--- a/src/compiler/glsl/blob.h
+++ b/src/compiler/glsl/blob.h
@@ -25,14 +25,14 @@
 #ifndef BLOB_H
 #define BLOB_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* The blob functions implement a simple, low-level API for serializing and
  * deserializing.
  *
diff --git a/src/compiler/glsl/glsl_symbol_table.h b/src/compiler/glsl/glsl_symbol_table.h
index 087cc71..be910b4 100644
--- a/src/compiler/glsl/glsl_symbol_table.h
+++ b/src/compiler/glsl/glsl_symbol_table.h
@@ -28,9 +28,7 @@
 
 #include <new>
 
-extern "C" {
 #include "program/symbol_table.h"
-}
 #include "ir.h"
 
 class symbol_table_entry;
diff --git a/src/compiler/glsl/ir_print_visitor.h b/src/compiler/glsl/ir_print_visitor.h
index 965e63a..858fe97 100644
--- a/src/compiler/glsl/ir_print_visitor.h
+++ b/src/compiler/glsl/ir_print_visitor.h
@@ -29,9 +29,7 @@
 #include "ir.h"
 #include "ir_visitor.h"
 
-extern "C" {
 #include "program/symbol_table.h"
-}
 
 /**
  * Abstract base class of visitors of IR instruction trees




More information about the mesa-commit mailing list