[CUDA] Initialize our header search using the host triple.
authorJustin Lebar <jlebar@google.com>
Fri, 18 Nov 2016 00:41:27 +0000 (00:41 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 18 Nov 2016 00:41:27 +0000 (00:41 +0000)
commitf91086b0a88e672ff5a796855057fc313fd10f7d
treeb058b81d75738ddf155dc8bbc91feefdc325f2b5
parent66c4fd7987d216e91d219e5e8437673a7b0167f8
[CUDA] Initialize our header search using the host triple.

Summary:
This used to work because system headers are found in a (somewhat)
predictable set of locations on Linux.  But this is not the case on
MacOS; without this change, we don't look in the right places for our
headers when doing device-side compilation on Mac.

Reviewers: tra

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D26776

llvm-svn: 287286
clang/lib/Frontend/CompilerInstance.cpp
clang/test/Preprocessor/cuda-macos-includes.cu [new file with mode: 0644]