summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2011-04-14 19:36:05 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2011-04-14 19:36:05 +0000
commitaca3d2c1c2cac957f4232c2feaf529387ef7fcb6 (patch)
tree245c3119b6d5b8f63903e93d22d5deecb634f06e /include
parente1247c5d8dfdf051dfb6035df1dae84827089385 (diff)
downloadgtest-aca3d2c1c2cac957f4232c2feaf529387ef7fcb6.tar.gz
gtest-aca3d2c1c2cac957f4232c2feaf529387ef7fcb6.tar.bz2
gtest-aca3d2c1c2cac957f4232c2feaf529387ef7fcb6.tar.xz
fixes a problem caused by gcc 4.6 optimization (by Paul Pluzhnikov)
git-svn-id: http://googletest.googlecode.com/svn/trunk@571 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'include')
-rw-r--r--include/gtest/internal/gtest-port.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h
index d2bc6cb..c6d102a 100644
--- a/include/gtest/internal/gtest-port.h
+++ b/include/gtest/internal/gtest-port.h
@@ -662,6 +662,13 @@
# define GTEST_API_
#endif
+#if defined(__GNUC__)
+// Ask the compiler to never inline a given function.
+#define GTEST_NO_INLINE_ __attribute__((noinline))
+#else
+#define GTEST_NO_INLINE_
+#endif // __GNUC__
+
namespace testing {
class Message;