[compiler-rt] e0e8695 - Revert "[fuzzer] Try to fix windows build after D156317"
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 10:51:55 PDT 2023
Author: Vitaly Buka
Date: 2023-08-28T10:50:51-07:00
New Revision: e0e8695a608f1bcb82439dc28bc98f78a9821f2c
URL: https://github.com/llvm/llvm-project/commit/e0e8695a608f1bcb82439dc28bc98f78a9821f2c
DIFF: https://github.com/llvm/llvm-project/commit/e0e8695a608f1bcb82439dc28bc98f78a9821f2c.diff
LOG: Revert "[fuzzer] Try to fix windows build after D156317"
Will not work, string::data() returns const char*;
This reverts commit d364597f8a479a4e223bc3194f5584f26b5aa7a5.
Added:
Modified:
compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
index 85742b105de03c..6bcba6151f2681 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp
@@ -237,10 +237,9 @@ void SetThreadName(std::thread &thread, const std::string &name) {
std::wstring wname;
auto sz = MultiByteToWideChar(CP_UTF8, 0, name.data(), name.size(), nullptr, 0);
wname.resize(sz);
- if (sz == MultiByteToWideChar(CP_UTF8, 0, name.data, name.size, wname.data(),
- sz) > 0) {
- wname.resize(sz - 1);
- (void)SetThreadDescription(thread.native_handle(), wname.c_str());
+ if (sz == MultiByteToWideChar(CP_UTF8, 0, name.data, name.size, &wname[0], sz) > 0) {
+ wname.resize(sz - 1);
+ (void)SetThreadDescription(thread.native_handle(), wname.c_str());
}
}
More information about the llvm-commits
mailing list