[PATCH] D102260: Update MSVC version number in preprocessor check

Neal via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 10:54:09 PDT 2021


nealsid created this revision.
nealsid added a reviewer: DavidSpickett.
nealsid added a project: LLVM.
Herald added a subscriber: hiraditya.
nealsid requested review of this revision.
Herald added a subscriber: llvm-commits.

Passing template parameter packs to std::map doesn't work in VS 2017/2019, so this updates the preprocessor version check to use an alternate version in VS2019, as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102260

Files:
  llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp


Index: llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
===================================================================
--- llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -299,8 +299,8 @@
   return getIfUnordered(dyn_cast<StoreInst>(In));
 }
 
-#if !defined(_MSC_VER) || _MSC_VER >= 1924
-// VS2017 has trouble compiling this:
+#if !defined(_MSC_VER) || _MSC_VER >= 1926
+// VS2019 has trouble compiling this:
 // error C2976: 'std::map': too few template arguments
 template <typename Pred, typename... Ts>
 void erase_if(std::map<Ts...> &map, Pred p)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102260.344483.patch
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/9de76265/attachment.bin>


More information about the llvm-commits mailing list