mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 14:50:26 +00:00
[libcxx] [test] Use a string_view of the native path type in the concat test
This makes sure that no extra allocations happen on windows, fixing earlier errors in the DisableAllocationGuard (in the second case that is modified). This is split out from D98398. Differential Revision: https://reviews.llvm.org/D98406
This commit is contained in:
parent
e4f385d894
commit
cb2648e6f0
@ -341,7 +341,7 @@ int main(int, char**)
|
||||
}
|
||||
{
|
||||
path LHS((const char*)TC.lhs);
|
||||
std::string_view RHS((const char*)TC.rhs);
|
||||
std::basic_string_view<path::value_type> RHS((const path::value_type*)TC.rhs);
|
||||
path& Ref = (LHS += RHS);
|
||||
assert(LHS == (const char*)TC.expect);
|
||||
assert(&Ref == &LHS);
|
||||
@ -367,7 +367,7 @@ int main(int, char**)
|
||||
}
|
||||
{
|
||||
path LHS((const char*)TC.lhs);
|
||||
std::string_view RHS((const char*)TC.rhs);
|
||||
std::basic_string_view<path::value_type> RHS((const path::value_type*)TC.rhs);
|
||||
const char* E = TC.expect;
|
||||
PathReserve(LHS, StrLen(E) + 5);
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user