[CUDA] Copy host builtin types to NVPTXTargetInfo.
authorJustin Lebar <jlebar@google.com>
Fri, 29 Apr 2016 23:05:19 +0000 (23:05 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 29 Apr 2016 23:05:19 +0000 (23:05 +0000)
commit76945b2f440dd798a814a8e485b42ab9671656ea
tree4ebae7b527b49e701e2dd29f2bb73af101ead024
parent4b2fdccad95e47f764424e35f63d0df58f3ae86a
[CUDA] Copy host builtin types to NVPTXTargetInfo.

Summary:
Host and device types must match, otherwise when we pass values back and
forth between the host and device, we will get the wrong result.

This patch makes NVPTXTargetInfo inherit most of its type information
from the host's target info.

Reviewers: rsmith

Subscribers: cfe-commits, jhen, tra

Differential Revision: http://reviews.llvm.org/D19346

llvm-svn: 268131
clang/include/clang/Basic/TargetOptions.h
clang/lib/Basic/Targets.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Preprocessor/cuda-types.cu [new file with mode: 0644]