[llvm] e89b60f - Update MSVC version number in preprocessor check

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 02:04:46 PDT 2021


Author: Neal (nealsid)
Date: 2021-05-18T10:04:39+01:00
New Revision: e89b60fcfc7ff776e93a94a54421850cc104a6df

URL: https://github.com/llvm/llvm-project/commit/e89b60fcfc7ff776e93a94a54421850cc104a6df
DIFF: https://github.com/llvm/llvm-project/commit/e89b60fcfc7ff776e93a94a54421850cc104a6df.diff

LOG: Update MSVC version number in preprocessor check

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.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D102260

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
index 5fb1cf690f19b..73798de474e91 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -299,9 +299,10 @@ template <> StoreInst *isCandidate<StoreInst>(Instruction *In) {
   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
+// VS2017 and some versions of VS2019 have trouble compiling this:
 // error C2976: 'std::map': too few template arguments
+// VS 2019 16.x is known to work, except for 16.4/16.5 (MSC_VER 1924/1925)
 template <typename Pred, typename... Ts>
 void erase_if(std::map<Ts...> &map, Pred p)
 #else


        


More information about the llvm-commits mailing list