Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2468)

Unified Diff: base/compiler_specific.h

Issue 9380026: Add a stackframe named 'CrashIntentionally' to crashes from about:crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a comment to base on how to use NOINLINE Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | content/renderer/render_view_impl.cc » ('j') | content/renderer/render_view_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698