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:
4007324
)
Make ERROR_IF_USED macro work with GCC <= 4.2, Apple GCCs
author
Douglas Gregor
<dgregor@apple.com>
Mon, 16 Nov 2009 16:56:48 +0000
(16:56 +0000)
committer
Douglas Gregor
<dgregor@apple.com>
Mon, 16 Nov 2009 16:56:48 +0000
(16:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88916
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 cce652f9261947ece3799db13ebcc349f8ecc04a..5c414f8d5616d38a463049c8a780b53bcd1e2aa1 100644
(file)
--- a/
include/llvm/Support/Compiler.h
+++ b/
include/llvm/Support/Compiler.h
@@
-78,8
+78,10
@@
#define NORETURN
#endif
-#if
def __GNUC__
+#if
defined(__GNUC__) && ((__GNUC__ > 4)||(__GNUC__ == 4 && __GNUC_MINOR__ > 2))
#define ERROR_IF_USED __attribute__((error("wrong usage")))
+#elif defined(__APPLE__)
+#define ERROR_IF_USED __attribute__((unavailable))
#else
#define ERROR_IF_USED
#endif