mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 12:56:35 +00:00
[DiagnosticInfo] Fix the default DiagnosticSeverity (#120342)
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:".
This commit is contained in:
parent
b1f4a0201a
commit
c189b2a1ec
@ -150,7 +150,7 @@ public:
|
||||
: 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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user