[llvm] r198401 - MSVC 2010 build fix

Alp Toker alp at nuanti.com
Thu Jan 2 23:58:20 PST 2014


Author: alp
Date: Fri Jan  3 01:58:20 2014
New Revision: 198401

URL: http://llvm.org/viewvc/llvm-project?rev=198401&view=rev
Log:
MSVC 2010 build fix

Back out the part of r198399 that enabled LLVM_FINAL/LLVM_OVERRIDE on VS 2010.

DwarfUnit.h legitimately uses them on destructors which unfortunately triggers
Compiler Error C3665 (override specifier not allowed on a destructor/finalizer)
prior to MSVC 2012:

  virtual ~DwarfCompileUnit() LLVM_OVERRIDE;

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=198401&r1=198400&r2=198401&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Fri Jan  3 01:58:20 2014
@@ -154,8 +154,6 @@
 #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
@@ -163,7 +161,7 @@
 /// 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(1600)
+    defined(__GXX_EXPERIMENTAL_CXX0X__) || LLVM_MSC_PREREQ(1700)
 #define LLVM_OVERRIDE override
 #else
 #define LLVM_OVERRIDE





More information about the llvm-commits mailing list