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

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 05:06:38 PDT 2016


rovka added inline comments.

================
Comment at: tools/llc/llc.cpp:264
@@ -264,4 +263,3 @@
+      if (MIR)
         M = MIR->parseLLVMModule();
     } else
----------------
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. 


http://reviews.llvm.org/D20371





More information about the llvm-commits mailing list