summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-06-29 15:49:03 +0000
committerGheorghe-Teodor Bercea <gheorghe-teod.bercea@ibm.com>2017-06-29 15:49:03 +0000
commit59d7b77b16bf11810091fe75a4348198783d3fbc (patch)
tree5b197c5f5e36b2376b9cba19f632288cbfd0230f /clang/lib/Frontend/InitPreprocessor.cpp
parent168c5a6a40db0f026ee987ff662ccce95097a426 (diff)
downloadbcm5719-llvm-59d7b77b16bf11810091fe75a4348198783d3fbc.tar.gz
bcm5719-llvm-59d7b77b16bf11810091fe75a4348198783d3fbc.zip
[OpenMP] Add support for auxiliary triple specification
Summary: Device offloading requires the specification of an additional flag containing the triple of the //other// architecture the code is being compiled on if such an architecture exists. If compiling for the host, the auxiliary triple flag will contain the triple describing the device and vice versa. Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29339 llvm-svn: 306689
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r--clang/lib/Frontend/InitPreprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp
index 08befb33c96..71420df0002 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -1043,7 +1043,7 @@ void clang::InitializePreprocessor(
if (InitOpts.UsePredefines) {
// FIXME: This will create multiple definitions for most of the predefined
// macros. This is not the right way to handle this.
- if (LangOpts.CUDA && PP.getAuxTargetInfo())
+ if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice) && PP.getAuxTargetInfo())
InitializePredefinedMacros(*PP.getAuxTargetInfo(), LangOpts, FEOpts,
Builder);
OpenPOWER on IntegriCloud