summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-03 05:00:46 +0000
committerAlp Toker <alp@nuanti.com>2014-01-03 05:00:46 +0000
commit74a990b16c0206a6d1caa4dbac9f965b690614da (patch)
tree5c16e9b90217f5ac636f8ff1af46d9dc505b9372 /include
parente611ea7ee5dcdf41ad513afb1e943a7393e42d96 (diff)
downloadllvm-74a990b16c0206a6d1caa4dbac9f965b690614da.tar.gz
llvm-74a990b16c0206a6d1caa4dbac9f965b690614da.tar.bz2
llvm-74a990b16c0206a6d1caa4dbac9f965b690614da.tar.xz
Enable LLVM_FINAL, LLVM_OVERRIDE and LLVM_HAS_VARIADIC_TEMPLATES with more gcc and MSVC versions
The 'sealed' definition of LLVM_FINAL can be dropped once VS 2010 is decommissioned. Some of this is speculative so will keep an eye on the waterfall -- ping me if you see failures. Incremental work towards C++11 migration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/Compiler.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 6e840898c4..413260f232 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -107,7 +107,7 @@
/// \brief Does this compiler support variadic templates.
///
/// Implies LLVM_HAS_RVALUE_REFERENCES and the existence of std::forward.
-#if __has_feature(cxx_variadic_templates)
+#if __has_feature(cxx_variadic_templates) || LLVM_MSC_PREREQ(1800)
# define LLVM_HAS_VARIADIC_TEMPLATES 1
#else
# define LLVM_HAS_VARIADIC_TEMPLATES 0
@@ -151,15 +151,19 @@
/// 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) || LLVM_MSC_PREREQ(1700)
+#if __has_feature(cxx_override_control) || \
+ defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1700)
#define LLVM_FINAL final
+#elif LLVM_MSC_PREREQ(1600)
+#define LLVM_FINAL sealed
#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) || LLVM_MSC_PREREQ(1700)
+#if __has_feature(cxx_override_control) || \
+ defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1600)
#define LLVM_OVERRIDE override
#else
#define LLVM_OVERRIDE