[PATCH] D20371: [llc] Remove exit-on-error flag from MIR tests (PR27770)

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 05:20:13 PDT 2016


rengolin accepted this revision.
rengolin added a reviewer: rengolin.
rengolin added a comment.
This revision is now accepted and ready to land.

Right, not only this is a no-brainer, but the current behaviour of the tests ("passing" on an unrelated assert) is dangerous.

LGTM, thanks!


================
Comment at: tools/llc/llc.cpp:264
@@ -264,4 +263,3 @@
+      if (MIR)
         M = MIR->parseLLVMModule();
     } else
----------------
rovka wrote:
> rengolin wrote:
> > Can you guarantee parseLLVMModule won't return a null pointer?
> > 
> > I mean, it's pretty unlikely, but I'm surprised that this was asserting and being the only reason the *whole* test was "passing".
> No, in fact parseLLVMModule is supposed to return null if it finds any errors. But when it does, we don't need to assert, we can just fall through to lines 267-270, where we print those errors and return. 
D'oh! Of course!


http://reviews.llvm.org/D20371





More information about the llvm-commits mailing list