15
15
#define SCAN_WIDEN2 (x ) L ## x
16
16
#define SCAN_WIDEN (x ) SCAN_WIDEN2(x)
17
17
18
+ #ifndef NOINLINE
19
+ #if __GNUC__
20
+ #define NOINLINE __attribute__ ((noinline))
21
+ #else
22
+ #define NOINLINE __declspec (noinline)
23
+ #endif
24
+ #endif
25
+
18
26
//
19
27
// PDB annotations for the static contract analysis tool. These are seperated
20
28
// from Contract.h to allow their inclusion in any part of the system.
@@ -236,7 +244,7 @@ namespace StaticContract
236
244
{
237
245
struct ScanThrowMarkerStandard
238
246
{
239
- __declspec (noinline) ScanThrowMarkerStandard()
247
+ NOINLINE ScanThrowMarkerStandard ()
240
248
{
241
249
METHOD_CANNOT_BE_FOLDED_DEBUG;
242
250
STATIC_CONTRACT_THROWS;
@@ -251,7 +259,7 @@ namespace StaticContract
251
259
252
260
struct ScanThrowMarkerTerminal
253
261
{
254
- __declspec (noinline) ScanThrowMarkerTerminal()
262
+ NOINLINE ScanThrowMarkerTerminal ()
255
263
{
256
264
METHOD_CANNOT_BE_FOLDED_DEBUG;
257
265
}
@@ -263,7 +271,7 @@ namespace StaticContract
263
271
264
272
struct ScanThrowMarkerIgnore
265
273
{
266
- __declspec (noinline) ScanThrowMarkerIgnore()
274
+ NOINLINE ScanThrowMarkerIgnore ()
267
275
{
268
276
METHOD_CANNOT_BE_FOLDED_DEBUG;
269
277
}
@@ -340,21 +348,21 @@ template <UINT COUNT>
340
348
class BlockMarker
341
349
{
342
350
public:
343
- __declspec (noinline) void MarkBlock ()
351
+ NOINLINE void MarkBlock ()
344
352
{
345
353
ANNOTATION_MARK_BLOCK_ANNOTATION;
346
354
METHOD_CANNOT_BE_FOLDED_DEBUG;
347
355
return ;
348
356
}
349
357
350
- __declspec (noinline) void UseMarkedBlockAnnotation ()
358
+ NOINLINE void UseMarkedBlockAnnotation ()
351
359
{
352
360
ANNOTATION_USE_BLOCK_ANNOTATION;
353
361
METHOD_CANNOT_BE_FOLDED_DEBUG;
354
362
return ;
355
363
}
356
364
357
- __declspec (noinline) void EndUseMarkedBlockAnnotation ()
365
+ NOINLINE void EndUseMarkedBlockAnnotation ()
358
366
{
359
367
ANNOTATION_END_USE_BLOCK_ANNOTATION;
360
368
METHOD_CANNOT_BE_FOLDED_DEBUG;
0 commit comments