diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-03-02 08:34:05 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-03-02 08:34:05 +0000 |
commit | f432a326c5c99d4562a703ce769cb48ce81f25a6 (patch) | |
tree | 22e068ee25e71c9d394372f90637691861e64ffa /include/llvm/Support | |
parent | 4eb03f049e5ab3bb914569591ca7655a084b5707 (diff) | |
download | llvm-f432a326c5c99d4562a703ce769cb48ce81f25a6.tar.gz llvm-f432a326c5c99d4562a703ce769cb48ce81f25a6.tar.bz2 llvm-f432a326c5c99d4562a703ce769cb48ce81f25a6.tar.xz |
Add back LLVM_FINAL macro. lld still needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Compiler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index 321910c013..c254554248 100644 --- a/include/llvm/Support/Compiler.h +++ b/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) || \ |