Skip to content

Commit de088dd

Browse files
committed
Revert " [sanitizer] adapt for 75f1f15"
This reverts commit de4c038. The change that triggered this fix got reverted.
1 parent b3b3cb2 commit de088dd

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ static llvm::symbolize::PrinterConfig getDefaultPrinterConfig() {
4141
return Config;
4242
}
4343

44-
static llvm::symbolize::ErrorHandler symbolize_error_handler(
45-
llvm::raw_string_ostream &OS) {
46-
return
47-
[&](const llvm::ErrorInfoBase &ErrorInfo, llvm::StringRef ErrorBanner) {
48-
OS << ErrorBanner;
49-
ErrorInfo.log(OS);
50-
OS << '\n';
51-
};
52-
}
53-
5444
namespace __sanitizer {
5545
int internal_snprintf(char *buffer, uintptr_t length, const char *format,
5646
...);
@@ -67,8 +57,8 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset,
6757
llvm::raw_string_ostream OS(Result);
6858
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
6959
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
70-
auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
71-
OS, symbolize_error_handler(OS), Config);
60+
auto Printer =
61+
std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
7262

7363
// TODO: it is neccessary to set proper SectionIndex here.
7464
// object::SectionedAddress::UndefSection works for only absolute addresses.
@@ -96,8 +86,8 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset,
9686
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
9787
llvm::raw_string_ostream OS(Result);
9888
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
99-
auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
100-
OS, symbolize_error_handler(OS), Config);
89+
auto Printer =
90+
std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
10191

10292
// TODO: it is neccessary to set proper SectionIndex here.
10393
// object::SectionedAddress::UndefSection works for only absolute addresses.

0 commit comments

Comments
 (0)