Skip to content

Commit 7967c90

Browse files
alanzhao1copybara-github
authored andcommitted
More fixes for code assuming that libc++ iterators are raw pointers
llvm/llvm-project#74482 changes the iterator type for std::string_view and std::array so that they're no longer raw pointers. This CL fixes builds for ChromeOS, MacOS, Android, and iOS. This CL does *not* fix Windows and Fuchsia - Windows is fixed in https://crrev.com/c/5362998, and Fuchsia is being fixed upstream. These changes were tested in a sample libc++ roll in https://crrev.com/c/5362421. AX-Relnotes: n/a Bug: 328308661 Change-Id: I7681d93b8b59a389c6c349821d25c3c93cb87bc1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5365796 Reviewed-by: Nico Weber <[email protected]> Owners-Override: Nico Weber <[email protected]> Commit-Queue: Alan Zhao <[email protected]> Cr-Commit-Position: refs/heads/main@{#1272559} NOKEYCHECK=True GitOrigin-RevId: 9b60fb150439bf1170ab74f6230169b48aff1c07
1 parent 93b8100 commit 7967c90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

debug/allocation_trace_unittest.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,12 @@ class OperationRecordTest : public Test {
350350
// to inline, depending i.e. on the optimization level. Therefore, we search
351351
// for the first common frame in both stack-traces. From there on, both must
352352
// be equal for the remaining number of frames.
353-
auto* const* const it_stack_trace_begin = std::begin(stack_trace);
354-
auto* const* const it_stack_trace_end =
353+
auto const it_stack_trace_begin = std::begin(stack_trace);
354+
auto const it_stack_trace_end =
355355
std::find(it_stack_trace_begin, std::end(stack_trace), nullptr);
356356
auto const it_reference_stack_trace_end = std::end(reference_stack_trace);
357357

358-
auto* const* it_stack_trace = std::find_first_of(
358+
auto const it_stack_trace = std::find_first_of(
359359
it_stack_trace_begin, it_stack_trace_end,
360360
std::begin(reference_stack_trace), it_reference_stack_trace_end);
361361

0 commit comments

Comments
 (0)