This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Don't define __NVCC__.
ClosedPublic

Authored by jlebar on Mar 23 2016, 3:33 PM.

Details

Summary

We decided this makes life too difficult for code authors. For example,
people may want to detect NVCC and disable variadic templates, which
NVCC does not support, but which we do.

Since people are going to have to change compiler flags *anyway* in
order to compile with clang, if they really want the old behavior, they
can pass -DNVCC.

Tested with tensorflow and thrust, no apparent problems.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 51482.Mar 23 2016, 3:33 PM
jlebar retitled this revision from to [CUDA] Don't define __NVCC__..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added a subscriber: cfe-commits.
tra accepted this revision.Mar 23 2016, 3:34 PM
tra edited edge metadata.
This revision is now accepted and ready to land.Mar 23 2016, 3:34 PM
This revision was automatically updated to reflect the committed changes.