@@ -58,16 +58,14 @@ class DiagnosticInfoValidateMD : public DiagnosticInfo {
5858 }
5959};
6060
61- static bool reportError (Module &M, Twine Message,
61+ static void reportError (Module &M, Twine Message,
6262 DiagnosticSeverity Severity = DS_Error) {
6363 M.getContext ().diagnose (DiagnosticInfoValidateMD (M, Message, Severity));
64- return true ;
6564}
6665
67- static bool reportLoopError (Module &M, Twine Message,
66+ static void reportLoopError (Module &M, Twine Message,
6867 DiagnosticSeverity Severity = DS_Error) {
69- return reportError (M, Twine (" Invalid \" llvm.loop\" metadata: " ) + Message,
70- Severity);
68+ reportError (M, Twine (" Invalid \" llvm.loop\" metadata: " ) + Message, Severity);
7169}
7270
7371enum class EntryPropsTag {
@@ -358,13 +356,13 @@ static bool isLoopMDCompatible(Module &M, Metadata *MD) {
358356
359357 if (HintStr->getString () == " llvm.loop.unroll.count" ) {
360358 if (!ValidCountNode (HintMD)) {
361- reportLoopError (M, " Second operand of \" llvm.loop.unroll.count\" "
362- " must be a constant integer" );
359+ reportLoopError (M, " \" llvm.loop.unroll.count\" must have 2 operands and "
360+ " the second must be a constant integer" );
363361 return false ;
364362 }
365363 } else if (HintMD->getNumOperands () != 1 ) {
366364 reportLoopError (
367- M, " \" llvm.loop.unroll.disable\" and \" llvm.loop.unroll.disable \" "
365+ M, " \" llvm.loop.unroll.disable\" and \" llvm.loop.unroll.full \" "
368366 " must be provided as a single operand" );
369367 return false ;
370368 }
0 commit comments