aboutsummaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2023-07-13 10:10:02 -0700
committerNick Desaulniers <ndesaulniers@google.com>2023-07-13 10:20:09 -0700
commit8bb9414f1474d6a8caed2e7be5f1d3d999c8bae1 (patch)
tree3d6b3b34ce7754016c3578fdcaffcd1af9e239a8 /libcxxabi
parente909a2c1ca4d1f37a28293e6607136888ed889db (diff)
downloadllvm-8bb9414f1474d6a8caed2e7be5f1d3d999c8bae1.zip
llvm-8bb9414f1474d6a8caed2e7be5f1d3d999c8bae1.tar.gz
llvm-8bb9414f1474d6a8caed2e7be5f1d3d999c8bae1.tar.bz2
[Demangle] use std::string_view::data rather than &*std::string_view::begin
To fix expensive check builds that were failing when using MSVC's std::string_view::iterator::operator*, I added a few expressions like &*std::string_view::begin. @nico pointed out that this is literally the same thing and more clearly expressed as std::string_view::data. Link: https://github.com/llvm/llvm-project/issues/63740 Reviewed By: #libc_abi, ldionne, philnik, MaskRay Differential Revision: https://reviews.llvm.org/D154876
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/src/demangle/ItaniumDemangle.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index e39900e..28562f0 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -2342,7 +2342,7 @@ public:
Float value;
char buf[sizeof(Float)];
};
- const char *t = &*Contents.begin();
+ const char *t = Contents.data();
const char *last = t + N;
char *e = buf;
for (; t != last; ++t, ++e) {
@@ -3719,7 +3719,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseQualifiedType() {
std::string_view ProtoSourceName(Qual.data() + Len, Qual.size() - Len);
std::string_view Proto;
{
- ScopedOverride<const char *> SaveFirst(First, &*ProtoSourceName.begin()),
+ ScopedOverride<const char *> SaveFirst(First, ProtoSourceName.data()),
SaveLast(Last, &*ProtoSourceName.rbegin() + 1);
Proto = parseBareSourceName();
}