1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
diff --git a/include/EGL/egl.h b/include/EGL/egl.h
index 9f9e021..8ada051 100644
--- a/include/EGL/egl.h
+++ b/include/EGL/egl.h
@@ -38,6 +38,12 @@ extern "C" {
#include <EGL/eglplatform.h>
+#if defined(_MSC_VER) && !defined(ANGLE_WEBKIT_WIN)
+#define EGL_SOFT_LINKING 1
+#else
+#define EGL_SOFT_LINKING 0
+#endif
+
/* Generated on date 20150623 */
/* Generated C header for:
@@ -118,6 +124,7 @@ typedef void (*__eglMustCastToProperFunctionPointerType)(void);
#define EGL_VERSION 0x3054
#define EGL_WIDTH 0x3057
#define EGL_WINDOW_BIT 0x0004
+#if !EGL_SOFT_LINKING
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config);
EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list);
@@ -142,6 +149,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
+#endif
#endif /* EGL_VERSION_1_0 */
#ifndef EGL_VERSION_1_1
@@ -160,10 +168,12 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine);
#define EGL_TEXTURE_RGB 0x305D
#define EGL_TEXTURE_RGBA 0x305E
#define EGL_TEXTURE_TARGET 0x3081
+#if !EGL_SOFT_LINKING
EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval);
+#endif
#endif /* EGL_VERSION_1_1 */
#ifndef EGL_VERSION_1_2
@@ -199,11 +209,13 @@ typedef void *EGLClientBuffer;
#define EGL_SWAP_BEHAVIOR 0x3093
#define EGL_UNKNOWN ((EGLint)-1)
#define EGL_VERTICAL_RESOLUTION 0x3091
+#if !EGL_SOFT_LINKING
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api);
EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void);
EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
+#endif
#endif /* EGL_VERSION_1_2 */
#ifndef EGL_VERSION_1_3
@@ -232,7 +244,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void);
#define EGL_OPENGL_API 0x30A2
#define EGL_OPENGL_BIT 0x0008
#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400
+#if !EGL_SOFT_LINKING
EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void);
+#endif
#endif /* EGL_VERSION_1_4 */
#ifndef EGL_VERSION_1_5
@@ -284,6 +298,7 @@ typedef void *EGLImage;
#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8
#define EGL_IMAGE_PRESERVED 0x30D2
#define EGL_NO_IMAGE ((EGLImage)0)
+#if !EGL_SOFT_LINKING
EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync);
EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
@@ -294,8 +309,13 @@ EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *nat
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list);
EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list);
EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags);
+#endif
#endif /* EGL_VERSION_1_5 */
+#if EGL_SOFT_LINKING
+#include <EGL/eglsoftlinking.h>
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/include/GLES2/gl2.h b/include/GLES2/gl2.h
index 027e1f7..4d710c2 100644
--- a/include/GLES2/gl2.h
+++ b/include/GLES2/gl2.h
@@ -520,6 +520,11 @@ typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GL
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#if defined(_MSC_VER) && !defined(ANGLE_WEBKIT_WIN)
+#include <GLES2/gl2softlinking.h>
+#else
+
#ifdef GL_GLEXT_PROTOTYPES
GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);
GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
@@ -664,6 +669,7 @@ GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer);
GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
#endif
+#endif
#endif /* GL_ES_VERSION_2_0 */
#ifdef __cplusplus
diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h
index 965f7ab..f7b0ef7 100644
--- a/include/GLSLANG/ShaderLang.h
+++ b/include/GLSLANG/ShaderLang.h
@@ -25,7 +25,7 @@
#include <stddef.h>
-#include "KHR/khrplatform.h"
+#include "khrplatform.h"
#include <array>
#include <map>
diff --git a/src/common/angleutils.cpp b/src/common/angleutils.cpp
index 7099c21..4641928 100644
--- a/src/common/angleutils.cpp
+++ b/src/common/angleutils.cpp
@@ -36,7 +36,10 @@ size_t FormatStringIntoVector(const char *fmt, va_list vararg, std::vector<char>
std::string FormatString(const char *fmt, va_list vararg)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static std::vector<char> buffer(512);
+#pragma clang diagnostic pop
size_t len = FormatStringIntoVector(fmt, vararg, buffer);
return std::string(&buffer[0], len);
diff --git a/src/common/angleutils.h b/src/common/angleutils.h
index f5ef7bd..4cb556c 100644
--- a/src/common/angleutils.h
+++ b/src/common/angleutils.h
@@ -116,7 +116,10 @@ inline bool IsMaskFlagSet(T mask, T flag)
inline const char* MakeStaticString(const std::string &str)
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static std::set<std::string> strings;
+#pragma clang diagnostic pop
std::set<std::string>::iterator it = strings.find(str);
if (it != strings.end())
{
diff --git a/src/common/debug.cpp b/src/common/debug.cpp
index 746da5e..47e1565 100644
--- a/src/common/debug.cpp
+++ b/src/common/debug.cpp
@@ -69,7 +69,10 @@ void output(bool traceInDebugOnly, MessageType messageType, DebugTraceOutputType
{
if (DebugAnnotationsActive())
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static std::vector<char> buffer(512);
+#pragma clang diagnostic pop
size_t len = FormatStringIntoVector(format, vararg, buffer);
std::wstring formattedWideMessage(buffer.begin(), buffer.begin() + len);
diff --git a/src/common/mathutil.cpp b/src/common/mathutil.cpp
index acbcbdf..ba6da52 100644
--- a/src/common/mathutil.cpp
+++ b/src/common/mathutil.cpp
@@ -31,9 +31,12 @@ static const int g_sharedexp_mantissabits = 9;
// Emax is the maximum allowed biased exponent value (31)
static const int g_sharedexp_maxexponent = 31;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wglobal-constructors"
static const float g_sharedexp_max = ((pow(2.0f, g_sharedexp_mantissabits) - 1) /
pow(2.0f, g_sharedexp_mantissabits)) *
pow(2.0f, g_sharedexp_maxexponent - g_sharedexp_bias);
+#pragma clang diagnostic pop
unsigned int convertRGBFloatsTo999E5(float red, float green, float blue)
{
diff --git a/src/common/version.h b/src/common/version.h
index e7ffa7c..b653ae3 100644
--- a/src/common/version.h
+++ b/src/common/version.h
@@ -7,7 +7,7 @@
#ifndef COMMON_VERSION_H_
#define COMMON_VERSION_H_
-#include "id/commit.h"
+#include "commit.h"
#define ANGLE_MAJOR_VERSION 2
#define ANGLE_MINOR_VERSION 1
diff --git a/src/compiler/preprocessor/ExpressionParser.cpp b/src/compiler/preprocessor/ExpressionParser.cpp
index f737a2e..a8df235 100644
--- a/src/compiler/preprocessor/ExpressionParser.cpp
+++ b/src/compiler/preprocessor/ExpressionParser.cpp
@@ -1,5 +1,7 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
+/* Apple Note: For the avoidance of doubt, Apple elects to distribute this file under the terms of the BSD license. */
+
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
diff --git a/src/compiler/preprocessor/Tokenizer.cpp b/src/compiler/preprocessor/Tokenizer.cpp
index 40e910e..fee20c6 100644
--- a/src/compiler/preprocessor/Tokenizer.cpp
+++ b/src/compiler/preprocessor/Tokenizer.cpp
@@ -969,7 +969,7 @@ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif
-#ifndef YY_NO_INPUT
+#if 0
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner );
@@ -1858,7 +1858,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
#endif
-#ifndef YY_NO_INPUT
+#if 0
#ifdef __cplusplus
static int yyinput (yyscan_t yyscanner)
#else
@@ -1883,7 +1883,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{ /* need more input */
- int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+ auto offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++yyg->yy_c_buf_p;
switch ( yy_get_next_buffer( yyscanner ) )
@@ -2014,7 +2014,7 @@ static void pp_load_buffer_state (yyscan_t yyscanner)
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in pp_create_buffer()" );
- b->yy_buf_size = (yy_size_t)size;
+ b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
diff --git a/src/compiler/translator/Operator.cpp b/src/compiler/translator/Operator.cpp
index 57878b9..0b693e2 100644
--- a/src/compiler/translator/Operator.cpp
+++ b/src/compiler/translator/Operator.cpp
@@ -224,4 +224,4 @@ bool IsAssignment(TOperator op)
default:
return false;
}
-}
\ No newline at end of file
+}
diff --git a/src/compiler/translator/OutputHLSL.h b/src/compiler/translator/OutputHLSL.h
index db78859..f296dd9 100644
--- a/src/compiler/translator/OutputHLSL.h
+++ b/src/compiler/translator/OutputHLSL.h
@@ -56,21 +56,21 @@ class OutputHLSL : public TIntermTraverser
void header(TInfoSinkBase &out, const BuiltInFunctionEmulator *builtInFunctionEmulator);
// Visit AST nodes and output their code to the body stream
- void visitSymbol(TIntermSymbol*);
- void visitRaw(TIntermRaw*);
- void visitConstantUnion(TIntermConstantUnion*);
+ void visitSymbol(TIntermSymbol*) override;
+ void visitRaw(TIntermRaw*) override;
+ void visitConstantUnion(TIntermConstantUnion*) override;
bool visitSwizzle(Visit visit, TIntermSwizzle *node) override;
- bool visitBinary(Visit visit, TIntermBinary*);
- bool visitUnary(Visit visit, TIntermUnary*);
- bool visitTernary(Visit visit, TIntermTernary *);
- bool visitIfElse(Visit visit, TIntermIfElse *);
- bool visitSwitch(Visit visit, TIntermSwitch *);
- bool visitCase(Visit visit, TIntermCase *);
+ bool visitBinary(Visit visit, TIntermBinary*) override;
+ bool visitUnary(Visit visit, TIntermUnary*) override;
+ bool visitTernary(Visit visit, TIntermTernary *) override;
+ bool visitIfElse(Visit visit, TIntermIfElse *) override;
+ bool visitSwitch(Visit visit, TIntermSwitch *) override;
+ bool visitCase(Visit visit, TIntermCase *) override;
bool visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node) override;
- bool visitAggregate(Visit visit, TIntermAggregate*);
- bool visitBlock(Visit visit, TIntermBlock *node);
- bool visitLoop(Visit visit, TIntermLoop*);
- bool visitBranch(Visit visit, TIntermBranch*);
+ bool visitAggregate(Visit visit, TIntermAggregate*) override;
+ bool visitBlock(Visit visit, TIntermBlock *node) override;
+ bool visitLoop(Visit visit, TIntermLoop*) override;
+ bool visitBranch(Visit visit, TIntermBranch*) override;
bool isSingleStatement(TIntermNode *node);
bool handleExcessiveLoop(TInfoSinkBase &out, TIntermLoop *node);
diff --git a/src/compiler/translator/RewriteTexelFetchOffset.cpp b/src/compiler/translator/RewriteTexelFetchOffset.cpp
index 487c909..6d0c866 100644
--- a/src/compiler/translator/RewriteTexelFetchOffset.cpp
+++ b/src/compiler/translator/RewriteTexelFetchOffset.cpp
@@ -167,4 +167,4 @@ void RewriteTexelFetchOffset(TIntermNode *root,
Traverser::Apply(root, symbolTable, shaderVersion);
}
-} // namespace sh
\ No newline at end of file
+} // namespace sh
diff --git a/src/compiler/translator/RewriteTexelFetchOffset.h b/src/compiler/translator/RewriteTexelFetchOffset.h
index 4218f0b..c6db664 100644
--- a/src/compiler/translator/RewriteTexelFetchOffset.h
+++ b/src/compiler/translator/RewriteTexelFetchOffset.h
@@ -27,4 +27,4 @@ void RewriteTexelFetchOffset(TIntermNode *root,
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_REWRITE_TEXELFETCHOFFSET_H_
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp b/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp
index ef708cb..d205805 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp
+++ b/src/compiler/translator/RewriteUnaryMinusOperatorInt.cpp
@@ -109,4 +109,4 @@ void RewriteUnaryMinusOperatorInt(TIntermNode *root)
Traverser::Apply(root);
}
-} // namespace sh
\ No newline at end of file
+} // namespace sh
diff --git a/src/compiler/translator/RewriteUnaryMinusOperatorInt.h b/src/compiler/translator/RewriteUnaryMinusOperatorInt.h
index 50f0c44..802ed57 100644
--- a/src/compiler/translator/RewriteUnaryMinusOperatorInt.h
+++ b/src/compiler/translator/RewriteUnaryMinusOperatorInt.h
@@ -17,4 +17,4 @@ void RewriteUnaryMinusOperatorInt(TIntermNode *root);
} // namespace sh
-#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_
\ No newline at end of file
+#endif // COMPILER_TRANSLATOR_REWRITEUNARYMINUSOPERATORINT_H_
diff --git a/src/compiler/translator/TranslatorHLSL.h b/src/compiler/translator/TranslatorHLSL.h
index 213d860..d2add14 100644
--- a/src/compiler/translator/TranslatorHLSL.h
+++ b/src/compiler/translator/TranslatorHLSL.h
@@ -13,7 +13,9 @@ class TranslatorHLSL : public TCompiler
{
public:
TranslatorHLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutput output);
+#ifdef ANGLE_ENABLE_HLSL
TranslatorHLSL *getAsTranslatorHLSL() override { return this; }
+#endif // ANGLE_ENABLE_HLSL
bool hasInterfaceBlock(const std::string &interfaceBlockName) const;
unsigned int getInterfaceBlockRegister(const std::string &interfaceBlockName) const;
diff --git a/src/compiler/translator/glslang_tab.cpp b/src/compiler/translator/glslang_tab.cpp
index d9b8ada..3e50fbc 100644
--- a/src/compiler/translator/glslang_tab.cpp
+++ b/src/compiler/translator/glslang_tab.cpp
@@ -1,5 +1,7 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
+/* Apple Note: For the avoidance of doubt, Apple elects to distribute this file under the terms of the BSD license. */
+
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
diff --git a/src/compiler/translator/glslang_tab.h b/src/compiler/translator/glslang_tab.h
index d0e691d..74a56da 100644
--- a/src/compiler/translator/glslang_tab.h
+++ b/src/compiler/translator/glslang_tab.h
@@ -1,5 +1,7 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
+/* Apple Note: For the avoidance of doubt, Apple elects to distribute this file under the terms of the BSD license. */
+
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
diff --git a/src/libANGLE/Caps.cpp b/src/libANGLE/Caps.cpp
index 47e1cf0..0f4d69d 100644
--- a/src/libANGLE/Caps.cpp
+++ b/src/libANGLE/Caps.cpp
@@ -77,7 +77,10 @@ void TextureCapsMap::clear()
const TextureCaps &TextureCapsMap::get(GLenum internalFormat) const
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static TextureCaps defaultUnsupportedTexture;
+#pragma clang diagnostic pop
InternalFormatToCapsMap::const_iterator iter = mCapsMap.find(internalFormat);
return (iter != mCapsMap.end()) ? iter->second : defaultUnsupportedTexture;
}
@@ -594,7 +597,10 @@ const ExtensionInfoMap &GetExtensionInfoMap()
return map;
};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static const ExtensionInfoMap extensionInfo = buildExtensionInfoMap();
+#pragma clang diagnostic pop
return extensionInfo;
}
diff --git a/src/libANGLE/Device.cpp b/src/libANGLE/Device.cpp
index eb30b20..a94d500 100644
--- a/src/libANGLE/Device.cpp
+++ b/src/libANGLE/Device.cpp
@@ -38,7 +38,10 @@ static std::string GenerateExtensionsString(const T &extensions)
typedef std::set<egl::Device *> DeviceSet;
static DeviceSet *GetDeviceSet()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static DeviceSet devices;
+#pragma clang diagnostic pop
return &devices;
}
diff --git a/src/libANGLE/Display.cpp b/src/libANGLE/Display.cpp
index 92d7dda..5711117 100644
--- a/src/libANGLE/Display.cpp
+++ b/src/libANGLE/Display.cpp
@@ -90,21 +90,30 @@ typedef std::map<EGLNativeWindowType, Surface*> WindowSurfaceMap;
// associated with it.
static WindowSurfaceMap *GetWindowSurfaces()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static WindowSurfaceMap windowSurfaces;
+#pragma clang diagnostic pop
return &windowSurfaces;
}
typedef std::map<EGLNativeDisplayType, Display *> ANGLEPlatformDisplayMap;
static ANGLEPlatformDisplayMap *GetANGLEPlatformDisplayMap()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static ANGLEPlatformDisplayMap displays;
+#pragma clang diagnostic pop
return &displays;
}
typedef std::map<Device *, Display *> DevicePlatformDisplayMap;
static DevicePlatformDisplayMap *GetDevicePlatformDisplayMap()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static DevicePlatformDisplayMap displays;
+#pragma clang diagnostic pop
return &displays;
}
@@ -921,7 +930,10 @@ const ClientExtensions &Display::getClientExtensions()
const std::string &Display::getClientExtensionString()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static const std::string clientExtensionsString = GenerateExtensionsString(getClientExtensions());
+#pragma clang diagnostic pop
return clientExtensionsString;
}
diff --git a/src/libANGLE/HandleRangeAllocator.cpp b/src/libANGLE/HandleRangeAllocator.cpp
index f219f95..3831aca 100644
--- a/src/libANGLE/HandleRangeAllocator.cpp
+++ b/src/libANGLE/HandleRangeAllocator.cpp
@@ -223,4 +223,4 @@ bool HandleRangeAllocator::isUsed(GLuint handle) const
return current->second >= handle;
}
-} // namespace gl
\ No newline at end of file
+} // namespace gl
diff --git a/src/libANGLE/HandleRangeAllocator.h b/src/libANGLE/HandleRangeAllocator.h
index 20f9a11..1023a84 100644
--- a/src/libANGLE/HandleRangeAllocator.h
+++ b/src/libANGLE/HandleRangeAllocator.h
@@ -56,4 +56,4 @@ class HandleRangeAllocator final : angle::NonCopyable
} // namespace gl
-#endif // LIBANGLE_HANDLERANGEALLOCATOR_H_
\ No newline at end of file
+#endif // LIBANGLE_HANDLERANGEALLOCATOR_H_
diff --git a/src/libANGLE/Path.h b/src/libANGLE/Path.h
index b103c84..85f49c1 100644
--- a/src/libANGLE/Path.h
+++ b/src/libANGLE/Path.h
@@ -68,4 +68,4 @@ class Path final : angle::NonCopyable
} // namespace gl
-#endif // LIBANGLE_PATH_H_
\ No newline at end of file
+#endif // LIBANGLE_PATH_H_
diff --git a/src/libANGLE/formatutils.cpp b/src/libANGLE/formatutils.cpp
index ff285dd..55a5fc8 100644
--- a/src/libANGLE/formatutils.cpp
+++ b/src/libANGLE/formatutils.cpp
@@ -615,7 +615,10 @@ static InternalFormatInfoMap BuildInternalFormatInfoMap()
static const InternalFormatInfoMap &GetInternalFormatMap()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static const InternalFormatInfoMap formatMap = BuildInternalFormatInfoMap();
+#pragma clang diagnostic pop
return formatMap;
}
@@ -859,7 +862,10 @@ GLenum GetSizedInternalFormat(GLenum internalFormat, GLenum type)
const FormatSet &GetAllSizedInternalFormats()
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static FormatSet formatSet = BuildAllSizedInternalFormatSet();
+#pragma clang diagnostic pop
return formatSet;
}
diff --git a/src/libANGLE/renderer/PathImpl.h b/src/libANGLE/renderer/PathImpl.h
index 3607f69..cb03ed6 100644
--- a/src/libANGLE/renderer/PathImpl.h
+++ b/src/libANGLE/renderer/PathImpl.h
@@ -33,4 +33,4 @@ class PathImpl : angle::NonCopyable
} // namespace rx
-#endif // LIBANGLE_RENDERER_PATHIMPL_H_
\ No newline at end of file
+#endif // LIBANGLE_RENDERER_PATHIMPL_H_
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index 2f93651..49aa604 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -524,7 +524,10 @@ static bool IsValidES3CopyTexImageCombination(const Format &textureFormat,
const auto &textureFormatInfo = *textureFormat.info;
const auto &framebufferFormatInfo = *framebufferFormat.info;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wexit-time-destructors"
static const CopyConversionSet conversionSet = BuildValidES3CopyTexImageCombinations();
+#pragma clang diagnostic pop
if (conversionSet.find(CopyConversion(textureFormatInfo.format,
framebufferFormatInfo.format)) != conversionSet.end())
{
|