[NFC] [PPCGCodeGeneration] Print `verifyModule` failure to debug stream.

If verifyModule fails, it is helpful to know why it failed. Add a log to
the debug stream that prints the failure.

llvm-svn: 308727
This commit is contained in:
Siddharth Bhat 2017-07-21 11:21:44 +00:00
parent 16300e1265
commit a0fb8b23e1
1 changed files with 2 additions and 0 deletions

View File

@ -2084,6 +2084,8 @@ std::string GPUNodeBuilder::finalizeKernelFunction() {
if (verifyModule(*GPUModule)) {
DEBUG(dbgs() << "verifyModule failed on module:\n";
GPUModule->print(dbgs(), nullptr); dbgs() << "\n";);
DEBUG(dbgs() << "verifyModule Error:\n";
verifyModule(*GPUModule, &dbgs()););
if (FailOnVerifyModuleFailure)
llvm_unreachable("VerifyModule failed.");