rjmccall added a comment.

Oh.  It's not a good idea to try to match exact local IR names like this for 
two reasons:

- First, many IR names are different in builds with and without assertions.
- Second, it's pretty susceptible to innocuous changes in output.

You should use FileCheck patterns (`[[TEMP:%.*]] = bitcast [10 x i32]* ...` to 
define the variable, `[[TEMP]]` to refer to it) instead.

Also, you really have 15 different tests here.  Please split them up into 
different functions (in the same test file) with at least vaguely meaningful 
names (like `testStaticNonZero` or `testVolatileAllZeros`).  And please match 
their definition lines with CHECK-LABEL instead of a simple CHECK; this allows 
FileCheck to do a better job reporting multiple failures in a single file.

Finally, I'm not sure why you've included the b, c, and d tests at all, since 
they have nothing to do with your patch.  c4 and d4 don't even involve 
initialization code.


https://reviews.llvm.org/D42549



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to