aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorTacet <advenam.tacet@trailofbits.com>2024-01-08 18:56:43 +0100
committerGitHub <noreply@github.com>2024-01-08 18:56:43 +0100
commit5351ded68d579921a61b26a34e36046c22f668bd (patch)
treee9bae15457b23953c1403587878df8dfed0b8490 /clang/lib/Lex/ModuleMap.cpp
parentde15c5501903a5a52dcae976e40b8b1f6a838911 (diff)
downloadllvm-5351ded68d579921a61b26a34e36046c22f668bd.zip
llvm-5351ded68d579921a61b26a34e36046c22f668bd.tar.gz
llvm-5351ded68d579921a61b26a34e36046c22f668bd.tar.bz2
[libc++] Remove usage of internal string function in sstream (#75858)
This function replaces a call to `__move_assign` (internal function) with two calls to public member functions (`resize` and `erase`). The order of calls is chosen for the best performance. This change is required to [turn on ASan string annotations for short strings](https://github.com/llvm/llvm-project/pull/75882) (Short String Optimization - SSO). The `std::basic_string` class's `void __move_assign(basic_string&& __str, size_type __pos, size_type __len)` function operates on uninitialized strings, where it is reasonable to assume that the memory is not poisoned. However, in `sstream` this function is applied to existing strings that already have poisoned memory. String ASan annotations turned on here: https://github.com/llvm/llvm-project/pull/72677
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions