summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-03-02 08:34:05 +0000
committerCraig Topper <craig.topper@gmail.com>2014-03-02 08:34:05 +0000
commit973143eb4273cb0c0009ad0c19c7f97a369dec4d (patch)
treeb0676008c5e8ab9c20630806d6f5a754440fdc85 /llvm
parent77dfe45f81e13e68e768c9c6ee9c2d0c85f28687 (diff)
downloadbcm5719-llvm-973143eb4273cb0c0009ad0c19c7f97a369dec4d.tar.gz
bcm5719-llvm-973143eb4273cb0c0009ad0c19c7f97a369dec4d.zip
Add back LLVM_FINAL macro. lld still needs it.
llvm-svn: 202619
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/Compiler.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 321910c0139..c2545542480 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -106,6 +106,16 @@
#define LLVM_DELETED_FUNCTION
#endif
+/// LLVM_FINAL - Expands to 'final' if the compiler supports it.
+/// Use to mark classes or virtual methods as final.
+#if __has_feature(cxx_override_control) || \
+ (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \
+ LLVM_MSC_PREREQ(1700)
+#define LLVM_FINAL final
+#else
+#define LLVM_FINAL
+#endif
+
/// LLVM_OVERRIDE - Expands to 'override' if the compiler supports it.
/// Use to mark virtual methods as overriding a base class method.
#if __has_feature(cxx_override_control) || \
OpenPOWER on IntegriCloud