[llvm] 1b3d166 - StringRef.h: __builtin_strlen seems to exist in VS 2017 MSVC 19.16 or later

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 03:33:55 PST 2020


Author: Hans Wennborg
Date: 2020-02-06T12:33:44+01:00
New Revision: 1b3d1661bbeb2c90f8f3ef6e2b77a70bc148731e

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

LOG: StringRef.h: __builtin_strlen seems to exist in VS 2017 MSVC 19.16 or later

This is a follow-up to ff837aa63cd, as discussed on the llvm-commits
thread for that one.

Added: 
    

Modified: 
    llvm/include/llvm/ADT/StringRef.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 75a6e1a6b5a8..0c36e33cca91 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -81,7 +81,7 @@ namespace llvm {
 #if __cplusplus > 201402L
       return std::char_traits<char>::length(Str);
 #elif __has_builtin(__builtin_strlen) || defined(__GNUC__) || \
-    (defined(_MSC_VER) && _MSC_VER >= 1920)
+    (defined(_MSC_VER) && _MSC_VER >= 1916)
       return __builtin_strlen(Str);
 #else
       const char *Begin = Str;


        


More information about the llvm-commits mailing list