[llvm-branch-commits] [llvm] 55fc64b - [Hexagon] Tweak _MSC_VER workaround version

Reid Kleckner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 14 11:30:47 PST 2020


Author: Reid Kleckner
Date: 2020-12-14T11:26:36-08:00
New Revision: 55fc64bce08a30f1bf7f7ebf83df776a40700fbe

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

LOG: [Hexagon] Tweak _MSC_VER workaround version

My bot runs VS 2019, but it could not compile this code.

Message:
[55/2465] Building CXX object lib\Target\Hexagon\CMakeFiles\LLVMHexagonCodeGen.dir\HexagonVectorCombine.cpp.obj
FAILED: lib/Target/Hexagon/CMakeFiles/LLVMHexagonCodeGen.dir/HexagonVectorCombine.cpp.obj
...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\map(71): error C2976: 'std::map': too few template arguments
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\include\map(71): note: see declaration of 'std::map'

The version in the path, 14.23, corresponds to _MSC_VER 1923, so raise
the version floor to 1924.

I have not tested with versions between 1924 and 1928 (latest), but the
latest works with the variadic version.

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 4c0c202be4be..2d90e37349e5 100644
--- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
@@ -292,7 +292,7 @@ template <> StoreInst *isCandidate<StoreInst>(Instruction *In) {
   return getIfUnordered(dyn_cast<StoreInst>(In));
 }
 
-#if !defined(_MSC_VER) || _MSC_VER >= 1920
+#if !defined(_MSC_VER) || _MSC_VER >= 1924
 // VS2017 has trouble compiling this:
 // error C2976: 'std::map': too few template arguments
 template <typename Pred, typename... Ts>


        


More information about the llvm-branch-commits mailing list