Skip to content

Commit c189b2a

Browse files
authored
[DiagnosticInfo] Fix the default DiagnosticSeverity (#120342)
After 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:".
1 parent b1f4a02 commit c189b2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/IR/DiagnosticInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class DiagnosticInfoGeneric : public DiagnosticInfo {
150150
: DiagnosticInfo(DK_Generic, Severity), MsgStr(MsgStr) {}
151151

152152
DiagnosticInfoGeneric(const Instruction *I, const Twine &ErrMsg,
153-
DiagnosticSeverity Severity = DS_Warning)
153+
DiagnosticSeverity Severity = DS_Error)
154154
: DiagnosticInfo(DK_Generic, Severity), MsgStr(ErrMsg), Inst(I) {}
155155

156156
const Twine &getMsgStr() const { return MsgStr; }

0 commit comments

Comments
 (0)