[compiler-rt] a8d8c58 - [NFC][sanitizer] Remove temp buffer
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 15 23:03:36 PDT 2023
Author: Vitaly Buka
Date: 2023-09-15T23:03:20-07:00
New Revision: a8d8c58b39d8a767b0e0bd7277b608466a38e0f9
URL: https://github.com/llvm/llvm-project/commit/a8d8c58b39d8a767b0e0bd7277b608466a38e0f9
DIFF: https://github.com/llvm/llvm-project/commit/a8d8c58b39d8a767b0e0bd7277b608466a38e0f9.diff
LOG: [NFC][sanitizer] Remove temp buffer
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index e93aebf9542c14b..fcfaa0c36c2251b 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -698,11 +698,8 @@ static int dl_iterate_phdr_cb(dl_phdr_info *info, size_t size, void *arg) {
return AddModuleSegments(module_name.data(), info, data->modules);
}
- if (info->dlpi_name) {
- InternalScopedString module_name;
- module_name.AppendF("%s", info->dlpi_name);
- return AddModuleSegments(module_name.data(), info, data->modules);
- }
+ if (info->dlpi_name)
+ return AddModuleSegments(info->dlpi_name, info, data->modules);
return 0;
}
More information about the llvm-commits
mailing list