aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringRef.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2020-04-22 12:09:37 +0200
committerBenjamin Kramer <benny.kra@googlemail.com>2020-04-22 12:25:01 +0200
commitb198f1f86ce09b86825dd6d80de2c72a617e27f7 (patch)
tree6576b4d646a2e222fce01f98cf45a401b24896e0 /llvm/lib/Support/StringRef.cpp
parent2bf56743172c536b201a6f68b497694253236bd4 (diff)
downloadllvm-b198f1f86ce09b86825dd6d80de2c72a617e27f7.zip
llvm-b198f1f86ce09b86825dd6d80de2c72a617e27f7.tar.gz
llvm-b198f1f86ce09b86825dd6d80de2c72a617e27f7.tar.bz2
Make some static class members constexpr
This allows them to be ODR used in C++17 mode. NFC.
Diffstat (limited to 'llvm/lib/Support/StringRef.cpp')
-rw-r--r--llvm/lib/Support/StringRef.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp
index 104482d..6ae2a2b 100644
--- a/llvm/lib/Support/StringRef.cpp
+++ b/llvm/lib/Support/StringRef.cpp
@@ -19,7 +19,7 @@ using namespace llvm;
// MSVC emits references to this into the translation units which reference it.
#ifndef _MSC_VER
-const size_t StringRef::npos;
+constexpr size_t StringRef::npos;
#endif
// strncasecmp() is not available on non-POSIX systems, so define an