Skip to content
Commit 8aad330e authored by Jeff Bailey's avatar Jeff Bailey
Browse files

[libc] Fix API for remove_{prefix, suffix}

The API in StringView.h for remove_prefix was incorrect and was returning a
new StringView rather than just altering the view.

As part of this, also removed some of the safety features.  The comment
correctly noted that the behaviour is undefined in some cases,
but the code and test cases checked for that.

One caller was relying on the old behaviour, so fixed it and added some
comments.

Tested:
check-libc
llvmlibc
libc-loader-tests

Reviewed By: gchatelet

Differential Revision: https://reviews.llvm.org/D129950
parent 313f8a20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment