[PATCH] D65662: Remove support for unsupported MSVC versions

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 2 09:25:50 PDT 2019


jfb created this revision.
jfb added a reviewer: rnk.
Herald added subscribers: llvm-commits, lebedev.ri, dexonsmith, jkorous, hiraditya.
Herald added a reviewer: lebedev.ri.
Herald added a project: LLVM.
jfb marked an inline comment as done.
jfb added inline comments.


================
Comment at: llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp:77
-  const wchar_t *msdia_dll = nullptr;
-#if _MSC_VER >= 1900 && _MSC_VER < 2000
-  msdia_dll = L"msdia140.dll"; // VS2015
----------------
This seemed buggy, I think the intent was to get `msdia140` if it was available.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65662

Files:
  llvm/include/llvm/Demangle/DemangleConfig.h
  llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
  llvm/lib/Support/Windows/explicit_symbols.inc
  llvm/utils/benchmark/include/benchmark/benchmark.h


Index: llvm/utils/benchmark/include/benchmark/benchmark.h
===================================================================
--- llvm/utils/benchmark/include/benchmark/benchmark.h
+++ llvm/utils/benchmark/include/benchmark/benchmark.h
@@ -209,13 +209,8 @@
 #elif defined(_MSC_VER) && !defined(__clang__)
 #define BENCHMARK_UNUSED
 #define BENCHMARK_ALWAYS_INLINE __forceinline
-#if _MSC_VER >= 1900
 #define BENCHMARK_NOEXCEPT noexcept
 #define BENCHMARK_NOEXCEPT_OP(x) noexcept(x)
-#else
-#define BENCHMARK_NOEXCEPT
-#define BENCHMARK_NOEXCEPT_OP(x)
-#endif
 #define __func__ __FUNCTION__
 #else
 #define BENCHMARK_UNUSED
Index: llvm/lib/Support/Windows/explicit_symbols.inc
===================================================================
--- llvm/lib/Support/Windows/explicit_symbols.inc
+++ llvm/lib/Support/Windows/explicit_symbols.inc
@@ -90,12 +90,6 @@
   INLINE_DEF_FLOAT_SYMBOL(tanf, 1)
   INLINE_DEF_FLOAT_SYMBOL(tanhf, 1)
 
-  // These were added in VS 2013.
-#if (1800 <= _MSC_VER && _MSC_VER < 1900)
-  INLINE_DEF_FLOAT_SYMBOL(copysignf, 2)
-  INLINE_DEF_FLOAT_SYMBOL(fminf, 2)
-  INLINE_DEF_FLOAT_SYMBOL(fmaxf, 2)
-#endif
 #undef INLINE_DEF_FLOAT_SYMBOL
 #endif
 
Index: llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
===================================================================
--- llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
+++ llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp
@@ -73,13 +73,7 @@
 #if !defined(_MSC_VER)
   return llvm::make_error<PDBError>(pdb_error_code::dia_failed_loading);
 #else
-  const wchar_t *msdia_dll = nullptr;
-#if _MSC_VER >= 1900 && _MSC_VER < 2000
-  msdia_dll = L"msdia140.dll"; // VS2015
-#elif _MSC_VER >= 1800
-  msdia_dll = L"msdia120.dll"; // VS2013
-#else
-#error "Unknown Visual Studio version."
+  const wchar_t *msdia_dll = L"msdia140.dll";
 #endif
 
   HRESULT HR;
Index: llvm/include/llvm/Demangle/DemangleConfig.h
===================================================================
--- llvm/include/llvm/Demangle/DemangleConfig.h
+++ llvm/include/llvm/Demangle/DemangleConfig.h
@@ -15,13 +15,6 @@
 #ifndef LLVM_DEMANGLE_COMPILER_H
 #define LLVM_DEMANGLE_COMPILER_H
 
-#ifdef _MSC_VER
-// snprintf is implemented in VS 2015
-#if _MSC_VER < 1900
-#define snprintf _snprintf_s
-#endif
-#endif
-
 #ifndef __has_feature
 #define __has_feature(x) 0
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65662.213062.patch
Type: text/x-patch
Size: 2311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190802/d46f1a77/attachment.bin>


More information about the llvm-commits mailing list