[compiler-rt] b8e5363 - [compiler-rt] Avoid pulling in __cxa_pure_virtual
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 15:04:23 PDT 2024
Author: Alexander Richardson
Date: 2024-03-21T15:04:19-07:00
New Revision: b8e53630f899ddb8a2ec0d37bcb86608d58c4960
URL: https://github.com/llvm/llvm-project/commit/b8e53630f899ddb8a2ec0d37bcb86608d58c4960
DIFF: https://github.com/llvm/llvm-project/commit/b8e53630f899ddb8a2ec0d37bcb86608d58c4960.diff
LOG: [compiler-rt] Avoid pulling in __cxa_pure_virtual
When building optimized versions of the runtime libraries the compiler
is generally able to elide these references, but when building them
for maximum debug info (with -O0), these references remain which causes
the test suite to fail for tests that do not pull in the C++ standard
library.
Reviewed By: vitalybuka
Pull Request: https://github.com/llvm/llvm-project/pull/84613
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
index 10361a32034452..e39cb891575e4c 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.h
@@ -30,10 +30,15 @@ class StackTracePrinter {
virtual void RenderFrame(InternalScopedString *buffer, const char *format,
int frame_no, uptr address, const AddressInfo *info,
- bool vs_style,
- const char *strip_path_prefix = "") = 0;
+ bool vs_style, const char *strip_path_prefix = "") {
+ // Should be pure virtual, but we can't depend on __cxa_pure_virtual.
+ UNIMPLEMENTED();
+ }
- virtual bool RenderNeedsSymbolization(const char *format) = 0;
+ virtual bool RenderNeedsSymbolization(const char *format) {
+ // Should be pure virtual, but we can't depend on __cxa_pure_virtual.
+ UNIMPLEMENTED();
+ }
void RenderSourceLocation(InternalScopedString *buffer, const char *file,
int line, int column, bool vs_style,
@@ -44,7 +49,10 @@ class StackTracePrinter {
const char *strip_path_prefix);
virtual void RenderData(InternalScopedString *buffer, const char *format,
const DataInfo *DI,
- const char *strip_path_prefix = "") = 0;
+ const char *strip_path_prefix = "") {
+ // Should be pure virtual, but we can't depend on __cxa_pure_virtual.
+ UNIMPLEMENTED();
+ }
private:
// To be called from StackTracePrinter::GetOrInit
More information about the llvm-commits
mailing list