gtbercea added inline comments.

================
Comment at: test/Driver/openmp-offload.c:607
+
+// CHK-FOPENMP-EQ-TARGET: clang{{.*}} argument unused during compilation: 
'-Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr8'
+
----------------
hfinkel wrote:
> I don't see why you'd check that the arguments are unused. They should be 
> used. One exception might be that you might want to force -Xopenmp-target=foo 
> to be unused if foo is not a currently-targeted offloading triple. There 
> could be a separate test case for that.
> 
> Otherwise, I think you should be able to check the relevant backend commands, 
> no? (something like where CHK-COMMANDS is used above in this file).
Only the CUDA toolchain currently contains code which considers the value of 
the -Xopenmp-target flag. The CUDA toolchain is not capable of offloading until 
the next patch lands so any test for how the flag propagates to the CUDA 
toolchain will have to wait.

Passing a flag to some other toolchain again doesn't work because the other 
toolchains have not been instructed to look at this flag so they won't contain 
the passed flag in their respective command lines.

For a lack of a better test, what I wanted to show is that the usage of this 
flag doesn't throw an error such as unknown flag and is correctly recognized: 
"-Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr8". 





https://reviews.llvm.org/D34784



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

Reply via email to