[llvm] r202619 - Add back LLVM_FINAL macro. lld still needs it.

Craig Topper craig.topper at gmail.com
Sun Mar 2 00:34:05 PST 2014


Author: ctopper
Date: Sun Mar  2 02:34:05 2014
New Revision: 202619

URL: http://llvm.org/viewvc/llvm-project?rev=202619&view=rev
Log:
Add back LLVM_FINAL macro. lld still needs it.

Modified:
    llvm/trunk/include/llvm/Support/Compiler.h

Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=202619&r1=202618&r2=202619&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Sun Mar  2 02:34:05 2014
@@ -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) || \





More information about the llvm-commits mailing list