summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-08-27 13:16:05 +0000
committerChris Lattner <sabre@nondot.org>2006-08-27 13:16:05 +0000
commit6f3241dbbf6926a1ad1d0e2f1e50e6228a55b258 (patch)
treee98e913d39f03f7ccb946e865a23365584da191f /include
parenta4f0b3a084d120cfc5b5bb06f64b222f5cb72740 (diff)
downloadllvm-6f3241dbbf6926a1ad1d0e2f1e50e6228a55b258.tar.gz
llvm-6f3241dbbf6926a1ad1d0e2f1e50e6228a55b258.tar.bz2
llvm-6f3241dbbf6926a1ad1d0e2f1e50e6228a55b258.tar.xz
add directive to disable inlining
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Compiler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 046033fb9e..06be685f97 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -37,4 +37,12 @@
#define TEMPLATE_INSTANTIATION(X)
#endif
+// DISABLE_INLINE - On compilers where we have a directive to do so, mark a
+// method "not for inlining".
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#define DISABLE_INLINE __attribute__((noinline))
+#else
+#define DISABLE_INLINE
+#endif
+
#endif