summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-03-21 22:06:18 +0000
committerEric Christopher <echristo@gmail.com>2017-03-21 22:06:18 +0000
commit758aad76d88000fd9cada032fb4e7afa5e27e61c (patch)
treeba3b9dbd6f72d605db42eaf1544e02d765781fac /clang/lib/Frontend
parent8445cbd1ca964ff490268e0854ecafaf97718639 (diff)
downloadbcm5719-llvm-758aad76d88000fd9cada032fb4e7afa5e27e61c.tar.gz
bcm5719-llvm-758aad76d88000fd9cada032fb4e7afa5e27e61c.zip
Remove the -faltivec alias option and replace it with -maltivec everywhere.
The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. llvm-svn: 298449
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp6
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index f660429e49d..e4a1be61fc9 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -916,6 +916,12 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
if (!hasTarget())
return false;
+ // FIXME: Setting this here is less than ideal, but it is set based on a
+ // target option for compatibility and this is immediately after we construct
+ // a target.
+ if (getTarget().hasFeature("altivec"))
+ getLangOpts().AltiVec = 1;
+
// Create TargetInfo for the other side of CUDA compilation.
if (getLangOpts().CUDA && !getFrontendOpts().AuxTriple.empty()) {
auto TO = std::make_shared<TargetOptions>();
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 4b6b17eb7e8..01ac69efe44 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1924,9 +1924,6 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Args.hasArg(OPT_fno_constant_cfstrings))
Opts.NoConstantCFStrings = 1;
- if (Args.hasArg(OPT_faltivec))
- Opts.AltiVec = 1;
-
if (Args.hasArg(OPT_fzvector))
Opts.ZVector = 1;
OpenPOWER on IntegriCloud