[compiler-rt] de088dd - Revert " [sanitizer] adapt for 75f1f158812dabc03e70697b6b9c272230bce63d"
Krasimir Georgiev via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 14 06:56:37 PDT 2023
Author: Krasimir Georgiev
Date: 2023-04-14T13:55:20Z
New Revision: de088dd3a0aa8f1a1e1ffb7ac4af264d5477dbfe
URL: https://github.com/llvm/llvm-project/commit/de088dd3a0aa8f1a1e1ffb7ac4af264d5477dbfe
DIFF: https://github.com/llvm/llvm-project/commit/de088dd3a0aa8f1a1e1ffb7ac4af264d5477dbfe.diff
LOG: Revert " [sanitizer] adapt for 75f1f158812dabc03e70697b6b9c272230bce63d"
This reverts commit de4c038c7ba2c6a8d529cb094f1a7c3deaae9b75.
The change that triggered this fix got reverted.
Added:
Modified:
compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp
index 2bc0444050f80..bca12d42f90a5 100644
--- a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp
@@ -41,16 +41,6 @@ static llvm::symbolize::PrinterConfig getDefaultPrinterConfig() {
return Config;
}
-static llvm::symbolize::ErrorHandler symbolize_error_handler(
- llvm::raw_string_ostream &OS) {
- return
- [&](const llvm::ErrorInfoBase &ErrorInfo, llvm::StringRef ErrorBanner) {
- OS << ErrorBanner;
- ErrorInfo.log(OS);
- OS << '\n';
- };
-}
-
namespace __sanitizer {
int internal_snprintf(char *buffer, uintptr_t length, const char *format,
...);
@@ -67,8 +57,8 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset,
llvm::raw_string_ostream OS(Result);
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
- auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
- OS, symbolize_error_handler(OS), Config);
+ auto Printer =
+ std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
// TODO: it is neccessary to set proper SectionIndex here.
// object::SectionedAddress::UndefSection works for only absolute addresses.
@@ -96,8 +86,8 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset,
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
llvm::raw_string_ostream OS(Result);
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
- auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
- OS, symbolize_error_handler(OS), Config);
+ auto Printer =
+ std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
// TODO: it is neccessary to set proper SectionIndex here.
// object::SectionedAddress::UndefSection works for only absolute addresses.
More information about the llvm-commits
mailing list