summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a92586)
raw | patch | inline | side by side (parent: 9a92586)
author | Logan Chien <tzuhsiang.chien@gmail.com> | |
Wed, 19 Feb 2014 15:04:29 +0000 (15:04 +0000) | ||
committer | Logan Chien <tzuhsiang.chien@gmail.com> | |
Wed, 19 Feb 2014 15:04:29 +0000 (15:04 +0000) |
According to http://gcc.gnu.org/projects/cxx0x.html,
override and final keyword was added in gcc 4.7. Thus,
we should not use these keywords in gcc 4.6 even when
__GXX_EXPERIMENTAL_CXX0X__ is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201679 91177308-0d34-0410-b5e6-96231b3b80d8
override and final keyword was added in gcc 4.7. Thus,
we should not use these keywords in gcc 4.6 even when
__GXX_EXPERIMENTAL_CXX0X__ is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201679 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Compiler.h | patch | blob | history |
index a6b5687d505e087a79b708220e3154bbe9a92bdd..49f299543498ce8083de224fc58af40e50e4ceeb 100644 (file)
/// 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__) || LLVM_MSC_PREREQ(1700)
+ (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \
+ LLVM_MSC_PREREQ(1700)
#define LLVM_FINAL final
#else
#define LLVM_FINAL
/// 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) || \
- defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1700)
+ (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC_PREREQ(4, 7)) || \
+ LLVM_MSC_PREREQ(1700)
#define LLVM_OVERRIDE override
#else
#define LLVM_OVERRIDE