diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h index 68d2deff959..1d7a9b6d56f 100644 --- a/include/llvm/ADT/StringRef.h +++ b/include/llvm/ADT/StringRef.h @@ -26,7 +26,7 @@ namespace llvm { class StringRef { public: typedef const char *iterator; - static const size_t npos = std::string::npos; + static const size_t npos = ~size_t(0); private: /// The start of the string, in an external buffer.