[llvm] r353081 - GlobalISel: Fix CheckMachineFunction passing if ReadCheckFile files
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 11:53:22 PST 2019
Author: arsenm
Date: Mon Feb 4 11:53:22 2019
New Revision: 353081
URL: http://llvm.org/viewvc/llvm-project?rev=353081&view=rev
Log:
GlobalISel: Fix CheckMachineFunction passing if ReadCheckFile files
This could be tested, but the FileCheck library spams the error
message to the console.
Modified:
llvm/trunk/unittests/CodeGen/GlobalISel/GISelMITest.h
Modified: llvm/trunk/unittests/CodeGen/GlobalISel/GISelMITest.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CodeGen/GlobalISel/GISelMITest.h?rev=353081&r1=353080&r2=353081&view=diff
==============================================================================
--- llvm/trunk/unittests/CodeGen/GlobalISel/GISelMITest.h (original)
+++ llvm/trunk/unittests/CodeGen/GlobalISel/GISelMITest.h Mon Feb 4 11:53:22 2019
@@ -195,7 +195,9 @@ static inline bool CheckMachineFunction(
SMLoc());
Regex PrefixRE = FC.buildCheckPrefixRegex();
std::vector<FileCheckString> CheckStrings;
- FC.ReadCheckFile(SM, CheckFileText, PrefixRE, CheckStrings);
+ if (FC.ReadCheckFile(SM, CheckFileText, PrefixRE, CheckStrings))
+ return false;
+
auto OutBuffer = OutputBuf->getBuffer();
SM.AddNewSourceBuffer(std::move(OutputBuf), SMLoc());
return FC.CheckInput(SM, OutBuffer, CheckStrings);
More information about the llvm-commits
mailing list