mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:50:30 +00:00
Declare __builtin_strlen in StringRef.h as constexpr
Otherwise Visual Studio 2017 will complain about llvm::StringRef::strlen not being constexpr: StringRef.h(80): error C3615: constexpr function 'llvm::StringRef::strLen' cannot result in a constant expression StringRef.h(84): note: failure was caused by call of undefined function or one not declared 'constexpr'
This commit is contained in:
parent
3f0180f097
commit
41105ccc60
@ -27,7 +27,7 @@
|
||||
// Declare the __builtin_strlen intrinsic for MSVC so it can be used in
|
||||
// constexpr context.
|
||||
#if defined(_MSC_VER)
|
||||
extern "C" size_t __builtin_strlen(const char *);
|
||||
extern "C" constexpr size_t __builtin_strlen(const char *);
|
||||
#endif
|
||||
|
||||
namespace llvm {
|
||||
|
Loading…
Reference in New Issue
Block a user