tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.

LGTM with a test nit.



================
Comment at: clang/test/CodeGenCUDA/unused-global-var.cu:23-29
+// CHECK-NOT: @_ZL2v3
+constexpr int v3 = 1;
+
+// Check managed variables are always kept.
+
+// CHECK: @v4
+__managed__ int v4;
----------------
Mixing CHECK and CHECK-NOT is tricky and, in general, only works if things are 
always in the same order.

E.g. if does `v3` get emitted after  `v4`, the test will still pass.

One way to deal with that would be to split the positive and negative checks 
into separate runs.
First one would check the variables we do want to keep with `CHECK-DAG`.
The other one would only check for the absence of the variables with `-NOT`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98783/new/

https://reviews.llvm.org/D98783

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

Reply via email to