[PATCH] Add test for LinkModules warning on triple, modified by r203009. Datalayout is already tested.
jfb at chromium.org
Mon Mar 10 18:27:16 PDT 2014
> I meant the following (what I suggested earlier) will not work because
> t.a.err is empty.
> > ; RUN: cat %t.a.err | FileCheck --check-prefix=WARN-A %s
> > WARN-A-NOT: WARNING: Linking two modules of different target triples:
> Your checkin is fine, but I think it is possible to simplify it with
> ; RUN: llvm-link %s %S/Inputs/targettriple-a.ll -S 2>&1 | FileCheck %s
> ; RUN: llvm-link %s %S/Inputs/targettriple-b.ll -S 2>&1 | FileCheck %s
> target triple = "e"
> ; WARN-A-NOT: WARNING: Linking two modules of different target triples:
> ; WARN-A: target triple = "e"
> ; WARN-B: WARNING: Linking two modules of different target triples:
> ; WARN-B: target triple = "e"
That could work too, but I think the original intent was to make sure that
nothing gets emitted. I could change the test to:
; WARN-A-NOT: WARNING:
To check that no warning got emitted, but at that point the existing check
is strictly more general since it checks that nothing (including warnings)
TL;DR: adding WARN-A-NOT is defensive since it's included in the other
check, but removing the other check means we're testing for strictly less.
I'm not sure that's a good idea.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits