summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-19 20:23:25 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-19 20:23:25 +0000
commitefafbbddfb6f48c332299b8451428d2e4c741f2a (patch)
tree2dbbb5ac65b666fb42e3525078bf23f1a72c807c /ipc
parent90ef237f07d7087fd35013852921ad585d26dadc (diff)
downloadchromium_src-efafbbddfb6f48c332299b8451428d2e4c741f2a.zip
chromium_src-efafbbddfb6f48c332299b8451428d2e4c741f2a.tar.gz
chromium_src-efafbbddfb6f48c332299b8451428d2e4c741f2a.tar.bz2
Fix for the new IPC system on gcc 4.5 and greater.
We need the new noclone attribute since gcc tries to specialize many of the ::Read() members for the subtypes since they're only invoked from Log(). Reported by some dude named flo on IRC. BUG=none TEST=none Review URL: http://codereview.chromium.org/3133025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_message_utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index c3a9ca4..75b80ae3 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -25,7 +25,15 @@
// ipc_message_utils_impl.h in those files) and exported, instead of expanded
// at every call site. Special note: GCC happily accepts the attribute before
// the method declaration, but only acts on it if it is after.
+#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40500
+// Starting in gcc 4.5, the noinline no longer implies the concept covered by
+// the introduced noclone attribute, which will create specialized versions of
+// functions/methods when certain types are constant.
+// www.gnu.org/software/gcc/gcc-4.5/changes.html
+#define IPC_MSG_NOINLINE __attribute__((noinline, noclone));
+#else
#define IPC_MSG_NOINLINE __attribute__((noinline));
+#endif
#elif defined(COMPILER_MSVC)
// MSVC++ doesn't do this.
#define IPC_MSG_NOINLINE