This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Reject calls to __device__ functions from host variable global initializers.
ClosedPublic

Authored by jlebar on Aug 9 2016, 3:12 PM.

Diff Detail

Event Timeline

jlebar updated this revision to Diff 67421.Aug 9 2016, 3:12 PM
jlebar retitled this revision from to [CUDA] Reject calls to __device__ functions from host variable global initializers..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added a subscriber: cfe-commits.
tra accepted this revision.Aug 9 2016, 3:22 PM
tra edited edge metadata.

LGTM.

clang/test/SemaCUDA/global-initializers-host.cu
2

I'd add the same comment as in the other test file explaining why both -verify is used with -emit-llvm instead of -fsyntax-only.

This revision is now accepted and ready to land.Aug 9 2016, 3:22 PM
jlebar updated this revision to Diff 67435.Aug 9 2016, 4:39 PM
jlebar marked an inline comment as done.
jlebar edited edge metadata.

Test tweak per review.

clang/test/SemaCUDA/global-initializers-host.cu
2

Good call, I don't actually need it here. :)

This revision was automatically updated to reflect the committed changes.