diff options
author | Justin Lebar <jlebar@google.com> | 2016-04-29 23:05:19 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-04-29 23:05:19 +0000 |
commit | 34008583693dc9db0cdbb9d448803773ceadb0db (patch) | |
tree | 6d4536faec1700c36151dccc2e7760ee2e805a6c /include/clang/Basic/TargetOptions.h | |
parent | 12b29f310bd7d85901a01e7bfc0a0862bd2f2d2e (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetOptions.h')
-rw-r--r-- | include/clang/Basic/TargetOptions.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetOptions.h b/include/clang/Basic/TargetOptions.h index 3718ee316a..81fb7b2117 100644 --- a/include/clang/Basic/TargetOptions.h +++ b/include/clang/Basic/TargetOptions.h @@ -27,6 +27,10 @@ public: /// target will be selected to match the host. std::string Triple; + /// When compiling for the device side, contains the triple used to compile + /// for the host. + std::string HostTriple; + /// If given, the name of the target CPU to generate code for. std::string CPU; |