Skip to content

Commit 22309c8

Browse files
committed
GlobalISel: Fix CheckMachineFunction passing if ReadCheckFile files
This could be tested, but the FileCheck library spams the error message to the console. llvm-svn: 353081
1 parent f3a46d0 commit 22309c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/unittests/CodeGen/GlobalISel/GISelMITest.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ static inline bool CheckMachineFunction(const MachineFunction &MF,
195195
SMLoc());
196196
Regex PrefixRE = FC.buildCheckPrefixRegex();
197197
std::vector<FileCheckString> CheckStrings;
198-
FC.ReadCheckFile(SM, CheckFileText, PrefixRE, CheckStrings);
198+
if (FC.ReadCheckFile(SM, CheckFileText, PrefixRE, CheckStrings))
199+
return false;
200+
199201
auto OutBuffer = OutputBuf->getBuffer();
200202
SM.AddNewSourceBuffer(std::move(OutputBuf), SMLoc());
201203
return FC.CheckInput(SM, OutBuffer, CheckStrings);

0 commit comments

Comments
 (0)