projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76df3f3
)
add an ALWAYS_INLINE macro, which does the obvious thing.
author
Chris Lattner
<sabre@nondot.org>
Tue, 15 Dec 2009 06:14:33 +0000
(06:14 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 15 Dec 2009 06:14:33 +0000
(06:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91416
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/Compiler.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/Compiler.h
b/include/llvm/Support/Compiler.h
index da31f9862885fea54420e484bd4e0350ecd05d64..8861a2095409d1de678c463da6ab47d45d5d5658 100644
(file)
--- a/
include/llvm/Support/Compiler.h
+++ b/
include/llvm/Support/Compiler.h
@@
-70,6
+70,16
@@
#define DISABLE_INLINE
#endif
+// ALWAYS_INLINE - On compilers where we have a directive to do so, mark a
+// method "always inline" because it is performance sensitive.
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#define ALWAYS_INLINE __attribute__((always_inline))
+#else
+// TODO: No idea how to do this with MSVC.
+#define ALWAYS_INLINE
+#endif
+
+
#ifdef __GNUC__
#define NORETURN __attribute__((noreturn))
#elif defined(_MSC_VER)