[llvm] [DiagnosticInfo] Fix the default DiagnosticSeverity (PR #120342)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 17:02:21 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Jinsong Ji (jsji)
<details>
<summary>Changes</summary>
After
https://github.com/llvm/llvm-project/commit/ea632e1b34e1
the API call to LLVMContext->emitError(I, Errorstr) default to warning
instead of error.
This cause problems as the API mentioned it is "prefixed with error:".
---
Full diff: https://github.com/llvm/llvm-project/pull/120342.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/DiagnosticInfo.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h
index 0d582cc17967e5..694785317af040 100644
--- a/llvm/include/llvm/IR/DiagnosticInfo.h
+++ b/llvm/include/llvm/IR/DiagnosticInfo.h
@@ -150,7 +150,7 @@ class DiagnosticInfoGeneric : public DiagnosticInfo {
: DiagnosticInfo(DK_Generic, Severity), MsgStr(MsgStr) {}
DiagnosticInfoGeneric(const Instruction *I, const Twine &ErrMsg,
- DiagnosticSeverity Severity = DS_Warning)
+ DiagnosticSeverity Severity = DS_Error)
: DiagnosticInfo(DK_Generic, Severity), MsgStr(ErrMsg), Inst(I) {}
const Twine &getMsgStr() const { return MsgStr; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/120342
More information about the llvm-commits
mailing list