diff options
Diffstat (limited to 'llvm/include/llvm/ADT/StringRef.h')
-rw-r--r-- | llvm/include/llvm/ADT/StringRef.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h index 9bfaaccd953e..f06d18720c3a 100644 --- a/llvm/include/llvm/ADT/StringRef.h +++ b/llvm/include/llvm/ADT/StringRef.h @@ -77,7 +77,8 @@ namespace llvm { static constexpr size_t strLen(const char *Str) { #if __cplusplus > 201402L return std::char_traits<char>::length(Str); -#elif __has_builtin(__builtin_strlen) || defined(__GNUC__) || defined(_MSC_VER) +#elif __has_builtin(__builtin_strlen) || defined(__GNUC__) || \ + (defined(_MSC_VER) && _MSC_VER >= 1916) return __builtin_strlen(Str); #else const char *Begin = Str; |