summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArtem Belevich <tra@google.com>2018-05-09 23:10:09 +0000
committerArtem Belevich <tra@google.com>2018-05-09 23:10:09 +0000
commit679dafe69e868318fb6a627b6fe35922afb1ec99 (patch)
treec9fcf8878fcc1f352ffc636970ddb15328fff9f9 /clang/lib/Frontend/CompilerInvocation.cpp
parentac3951a7351b2a3144ad103fb3c759b9415f55f1 (diff)
downloadbcm5719-llvm-679dafe69e868318fb6a627b6fe35922afb1ec99.tar.gz
bcm5719-llvm-679dafe69e868318fb6a627b6fe35922afb1ec99.zip
[CUDA] Added -f[no-]cuda-short-ptr option
The option enables use of 32-bit pointers for accessing const/local/shared memory. The feature is disabled by default. Differential Revision: https://reviews.llvm.org/D46148 llvm-svn: 331938
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 71c946442d7..05e5196e32d 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -2922,6 +2922,8 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args,
Opts.Triple = llvm::sys::getDefaultTargetTriple();
Opts.OpenCLExtensionsAsWritten = Args.getAllArgValues(OPT_cl_ext_EQ);
Opts.ForceEnableInt128 = Args.hasArg(OPT_fforce_enable_int128);
+ Opts.NVPTXUseShortPointers = Args.hasFlag(
+ options::OPT_fcuda_short_ptr, options::OPT_fno_cuda_short_ptr, false);
}
bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
OpenPOWER on IntegriCloud