diff options
author | Brian Paul <[email protected]> | 2019-11-22 19:42:34 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2019-11-23 10:34:24 -0700 |
commit | a2689ebcd68ccf9b3bcbf9bae926c70beccd6a11 (patch) | |
tree | 60285024b3f9312fa6261df7a09920a44e6279e7 /src/compiler/nir | |
parent | 95fdde5a60fc04376eb49a1d62ead163516759f3 (diff) |
nir: no-op C99 _Pragma() with MSVC
This fixes a build failure on MSVC.
BTW, it looks like clang supports _Pragma() but I don't know if it
understands the "gcc unroll N" directive.
Signed-off-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir_range_analysis.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c index df5d4dab9af..d38bcc0b040 100644 --- a/src/compiler/nir/nir_range_analysis.c +++ b/src/compiler/nir/nir_range_analysis.c @@ -218,6 +218,13 @@ analyze_constant(const struct nir_alu_instr *instr, unsigned src, */ #define _______ unknown + +/* MSVC doesn't have C99's _Pragma() */ +#ifdef _MSC_VER +#define _Pragma(x) +#endif + + #ifndef NDEBUG #define ASSERT_TABLE_IS_COMMUTATIVE(t) \ do { \ |