diff options
author | Paul Kirth <paulkirth@google.com> | 2022-03-18 00:04:22 +0000 |
---|---|---|
committer | Paul Kirth <paulkirth@google.com> | 2022-03-18 00:04:22 +0000 |
commit | 6cf560d69a222bff4af4e1d092437fd77f0f981c (patch) | |
tree | 1294c0be71860eb829e4f5ad9d5a3bcbbbcf6edd /llvm/lib/IR/LLVMContext.cpp | |
parent | 10866a1df4a82cdc54187330c509a2d46235455d (diff) | |
download | llvm-6cf560d69a222bff4af4e1d092437fd77f0f981c.zip llvm-6cf560d69a222bff4af4e1d092437fd77f0f981c.tar.gz llvm-6cf560d69a222bff4af4e1d092437fd77f0f981c.tar.bz2 |
Revert "Revert "[misexpect] Re-implement MisExpect Diagnostics""
I mistakenly reverted my commit, so I'm relanding it.
This reverts commit 10866a1df4a82cdc54187330c509a2d46235455d.
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index f4e917c..df4a007 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -138,10 +138,22 @@ bool LLVMContext::getDiagnosticsHotnessRequested() const { void LLVMContext::setDiagnosticsHotnessThreshold(Optional<uint64_t> Threshold) { pImpl->DiagnosticsHotnessThreshold = Threshold; } - +void LLVMContext::setMisExpectWarningRequested(bool Requested) { + pImpl->MisExpectWarningRequested = Requested; +} +bool LLVMContext::getMisExpectWarningRequested() const { + return pImpl->MisExpectWarningRequested; +} uint64_t LLVMContext::getDiagnosticsHotnessThreshold() const { return pImpl->DiagnosticsHotnessThreshold.getValueOr(UINT64_MAX); } +void LLVMContext::setDiagnosticsMisExpectTolerance( + Optional<uint64_t> Tolerance) { + pImpl->DiagnosticsMisExpectTolerance = Tolerance; +} +uint64_t LLVMContext::getDiagnosticsMisExpectTolerance() const { + return pImpl->DiagnosticsMisExpectTolerance.getValueOr(0); +} bool LLVMContext::isDiagnosticsHotnessThresholdSetFromPSI() const { return !pImpl->DiagnosticsHotnessThreshold.hasValue(); |