summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2015-09-22 17:23:22 +0000
committerArtem Belevich <tra@google.com>2015-09-22 17:23:22 +0000
commitb5bc923af407cbe7e1d96fcb884c7ef5c6897bc0 (patch)
treea9c6e261ed99150fc40f767d7ec017ca104b6b8d /clang/lib/Frontend/CompilerInvocation.cpp
parentccf0d699f02710c75556bf74229a1bc4ce85547c (diff)
downloadbcm5719-llvm-b5bc923af407cbe7e1d96fcb884c7ef5c6897bc0.tar.gz
bcm5719-llvm-b5bc923af407cbe7e1d96fcb884c7ef5c6897bc0.zip
[CUDA] Allow parsing of host and device code simultaneously.
* adds -aux-triple option to specify target triple * propagates aux target info to AST context and Preprocessor * pulls in target specific preprocessor macros. * pulls in target-specific builtins from aux target. * sets appropriate host or device attribute on builtins. Differential Revision: http://reviews.llvm.org/D12917 llvm-svn: 248299
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index d7995627ac7..a9071339038 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -975,6 +975,9 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
Opts.OverrideRecordLayoutsFile
= Args.getLastArgValue(OPT_foverride_record_layout_EQ);
+ Opts.AuxTriple =
+ llvm::Triple::normalize(Args.getLastArgValue(OPT_aux_triple));
+
if (const Arg *A = Args.getLastArg(OPT_arcmt_check,
OPT_arcmt_modify,
OPT_arcmt_migrate)) {
OpenPOWER on IntegriCloud