Chromium Code Reviews| Index: base/compiler_specific.h | 
| diff --git a/base/compiler_specific.h b/base/compiler_specific.h | 
| index 99c38ce10ad18ee7f899529ef9dd868339d507ff..eee4bdb301cca0ef51f6aa6502da5b547d8b4c80 100644 | 
| --- a/base/compiler_specific.h | 
| +++ b/base/compiler_specific.h | 
| @@ -90,9 +90,18 @@ | 
| // int x ALLOW_UNUSED = ...; | 
| #if defined(COMPILER_GCC) | 
| #define ALLOW_UNUSED __attribute__((unused)) | 
| -#define NOINLINE __attribute__((noinline)) | 
| #else | 
| #define ALLOW_UNUSED | 
| +#endif | 
| + | 
| +// Annotate a function indicating it should not be inlined. | 
| +// Use like: | 
| +// NOINLINE void DoStuff() { ... } | 
| 
 
Nico
2012/02/10 22:54:57
Hm, this seems not general enough for me to belong
 
eroman
2012/02/10 23:06:00
To be clear this was already present in base, I am
 
 | 
| +#if defined(COMPILER_GCC) | 
| +#define NOINLINE __attribute__((noinline)) | 
| +#elif defined(COMPILER_MSVC) | 
| +#define NOINLINE __declspec(noinline) | 
| +#else | 
| #define NOINLINE | 
| #endif |