Skip to content

Commit 87b29f0

Browse files
committed
[PR] vitalybuka - revert 'HasSuppressions' function
1 parent 888b53d commit 87b29f0

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

compiler-rt/lib/rtsan/rtsan_assertions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void ExpectNotRealtime(Context &context, const DiagnosticsInfo &info,
3535
stack.Unwind(info.pc, info.bp, nullptr,
3636
__sanitizer::common_flags()->fast_unwind_on_fatal);
3737

38-
if (HasSuppressions() && IsStackTraceSuppressed(stack))
38+
if (IsStackTraceSuppressed(stack))
3939
return;
4040

4141
OnViolation(stack, info);

compiler-rt/lib/rtsan/rtsan_suppressions.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ static const char *ConvertTypeToFlagName(ErrorType Type) {
5252
UNREACHABLE("unknown ErrorType!");
5353
}
5454

55-
bool __rtsan::HasSuppressions() { return suppression_ctx != nullptr; }
56-
5755
void __rtsan::InitializeSuppressions() {
5856
CHECK_EQ(nullptr, suppression_ctx);
5957

@@ -67,7 +65,8 @@ void __rtsan::InitializeSuppressions() {
6765
}
6866

6967
bool __rtsan::IsStackTraceSuppressed(const StackTrace &stack) {
70-
CHECK(HasSuppressions());
68+
if (suppression_ctx == nullptr)
69+
return false;
7170

7271
const char *call_stack_flag =
7372
ConvertTypeToFlagName(ErrorType::CallStackContains);

compiler-rt/lib/rtsan/rtsan_suppressions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
namespace __rtsan {
1818

1919
void InitializeSuppressions();
20-
bool HasSuppressions();
2120
bool IsStackTraceSuppressed(const __sanitizer::StackTrace &stack);
2221

2322
} // namespace __rtsan

0 commit comments

Comments
 (0)