summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-03-18 22:38:29 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-03-18 22:38:29 +0000
commit599cb8e4302a8718df0309147fdf6f64c3e2172d (patch)
treeabbfa00685e429ec1b610048274196fd98e7da02 /clang/lib/Frontend/CompilerInvocation.cpp
parentd15609a582a5ec8e6788784c9e1732fa95a1109f (diff)
downloadbcm5719-llvm-599cb8e4302a8718df0309147fdf6f64c3e2172d.tar.gz
bcm5719-llvm-599cb8e4302a8718df0309147fdf6f64c3e2172d.zip
Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
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 9d9c99611cf..2b5c289cbf9 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -672,6 +672,8 @@ static void LangOptsToArgs(const LangOptions &Opts,
Res.push_back("-fconstant-string-class");
Res.push_back(Opts.ObjCConstantStringClass);
}
+ if (Opts.FakeAddressSpaceMap)
+ Res.push_back("-ffake-address-space-map");
}
static void PreprocessorOptsToArgs(const PreprocessorOptions &Opts,
@@ -1483,6 +1485,7 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.FastRelaxedMath = Args.hasArg(OPT_cl_fast_relaxed_math);
Opts.OptimizeSize = 0;
Opts.MRTD = Args.hasArg(OPT_mrtd);
+ Opts.FakeAddressSpaceMap = Args.hasArg(OPT_ffake_address_space_map);
// FIXME: Eliminate this dependency.
unsigned Opt = getOptimizationLevel(Args, IK, Diags);
OpenPOWER on IntegriCloud