Skip to content

Commit

Permalink
Move the visibility pragmas below the includes.
Browse files Browse the repository at this point in the history
This fixes some possible issues with the linker and the standard C runtime.
  • Loading branch information
flibitijibibo committed Apr 23, 2019
1 parent 8d9f7ea commit 153eb42
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_arb1.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

#if SUPPORT_PROFILE_ARB1

static inline const char *get_ARB1_register_string(Context *ctx,
Expand Down Expand Up @@ -2249,4 +2249,4 @@ void emit_ARB1_TEXLD(Context *ctx)

#endif // SUPPORT_PROFILE_ARB1

#pragma GCC visibility pop
#pragma GCC visibility pop
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_bytecode.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

#if SUPPORT_PROFILE_BYTECODE

void emit_BYTECODE_start(Context *ctx, const char *profilestr)
Expand Down Expand Up @@ -149,4 +149,4 @@ EMIT_BYTECODE_OPCODE_FUNC(TEXLD)

#endif // SUPPORT_PROFILE_BYTECODE

#pragma GCC visibility pop
#pragma GCC visibility pop
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_common.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

// Common Utilities

void out_of_memory(Context *ctx)
Expand Down Expand Up @@ -501,4 +501,4 @@ const char *get_D3D_varname(Context *ctx, RegisterType rt, int regnum)
return StrDup(ctx, buf);
} // get_D3D_varname

#pragma GCC visibility pop
#pragma GCC visibility pop
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_d3d.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

#if SUPPORT_PROFILE_D3D

const char *make_D3D_srcarg_string_in_buf(Context *ctx,
Expand Down Expand Up @@ -683,4 +683,4 @@ void emit_D3D_SINCOS(Context *ctx)

#endif // SUPPORT_PROFILE_D3D

#pragma GCC visibility pop
#pragma GCC visibility pop
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_glsl.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

#if SUPPORT_PROFILE_GLSL

#define EMIT_GLSL_OPCODE_UNIMPLEMENTED_FUNC(op) \
Expand Down Expand Up @@ -2304,4 +2304,4 @@ void emit_GLSL_RESERVED(Context *ctx)

#endif // SUPPORT_PROFILE_GLSL

#pragma GCC visibility pop
#pragma GCC visibility pop
6 changes: 3 additions & 3 deletions profiles/mojoshader_profile_metal.c
Expand Up @@ -7,11 +7,11 @@
* This file written by Ryan C. Gordon.
*/

#pragma GCC visibility push(hidden)

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_profile.h"

#pragma GCC visibility push(hidden)

// !!! FIXME: A lot of this is cut-and-paste from the GLSL version.
#if SUPPORT_PROFILE_METAL

Expand Down Expand Up @@ -2302,4 +2302,4 @@ void emit_METAL_RESERVED(Context *ctx)

#endif // SUPPORT_PROFILE_METAL

#pragma GCC visibility pop
#pragma GCC visibility pop

0 comments on commit 153eb42

Please sign in to comment.