]> granicus.if.org Git - clang/commitdiff
The time when -faltivec (or, on clang only, -maltivec) will magically
authorEric Christopher <echristo@gmail.com>
Thu, 24 Mar 2016 01:26:08 +0000 (01:26 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 24 Mar 2016 01:26:08 +0000 (01:26 +0000)
include altivec.h has come and gone.

Rationale: This causes modules, rewrite-includes, etc to be sad and
people should just include altivec.h in their source.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264235 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInvocation.cpp
test/CodeGen/builtins-ppc-altivec.c
test/CodeGen/builtins-ppc-p8vector.c
test/CodeGen/builtins-ppc-quadword.c
test/CodeGen/builtins-ppc-vsx.c
test/Parser/cxx-altivec.cpp

index 1764c3ce9c806162d1dab7ca8141f0d59c551569..6b2e93f21bf05685c7c92cc320f8b920b488bd9a 100644 (file)
@@ -2002,10 +2002,6 @@ static void ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args,
   for (const Arg *A : Args.filtered(OPT_chain_include))
     Opts.ChainedIncludes.emplace_back(A->getValue());
 
-  // Include 'altivec.h' if -faltivec option present
-  if (Args.hasArg(OPT_faltivec))
-    Opts.Includes.emplace_back("altivec.h");
-
   for (const Arg *A : Args.filtered(OPT_remap_file)) {
     std::pair<StringRef, StringRef> Split = StringRef(A->getValue()).split(';');
 
index f9e0584ad05578a501a76dbccdc61c520af1904e..1edf99f8681cf28e81273b95fcfe20e13c35be7c 100644 (file)
@@ -6,8 +6,11 @@
 // RUN: %clang_cc1 -faltivec -triple powerpc64le-unknown-unknown -emit-llvm %s \
 // RUN:            -o - | FileCheck %s -check-prefix=CHECK-LE
 // RUN: not %clang_cc1 -triple powerpc64le-unknown-unknown -emit-llvm %s \
-// RUN:            -ferror-limit 0 -o - 2>&1 \
+// RUN:            -ferror-limit 0 -DNO_ALTIVEC -o - 2>&1 \
 // RUN:            | FileCheck %s -check-prefix=CHECK-NOALTIVEC
+#ifndef NO_ALTIVEC
+#include <altivec.h>
+#endif
 
 vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 };
 vector signed char vsc = { 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16 };
index 594ed335c85ffb78c318335f6060f723a68414ab..096e3e1bb6b54c0835075ac249c44b7e85e302ab 100644 (file)
@@ -6,6 +6,7 @@
 // generate the correct errors for functions that are only overloaded with VSX
 // (vec_cmpge, vec_cmple). Without this option, there is only one overload so
 // it is selected.
+#include <altivec.h>
 
 void dummy() { }
 signed int si;
index e17b6791d5f6d737faf2b0e3d7b0532f9824ea9b..f381642c422f620f5c264a4487136ddadf4f2846 100644 (file)
@@ -8,6 +8,7 @@
 
 // RUN: not %clang_cc1 -faltivec -triple powerpc-unknown-unknown \
 // RUN: -emit-llvm %s -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PPC
+#include <altivec.h>
 
 // CHECK-PPC: error: __int128 is not supported on this target
 vector signed __int128 vlll = { -1 };
index 27f160586d9cc066b2cf5f74b7ad9affbdb290c6..21a24a2c8946c6672766151350b335d3d44e2ba4 100644 (file)
@@ -1,6 +1,7 @@
 // REQUIRES: powerpc-registered-target
 // RUN: %clang_cc1 -faltivec -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 // RUN: %clang_cc1 -faltivec -target-feature +vsx -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-LE
+#include <altivec.h>
 
 vector signed char vsc = { -8,  9, -10, 11, -12, 13, -14, 15,
                            -0,  1,  -2,  3,  -4,  5,  -6,  7};
index ac20de288f172042292699ee21c1ba00c9c77243..5b0da6c5e6fd98e2d6d477b490f04a598f02952f 100644 (file)
@@ -1,6 +1,7 @@
 // RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify -std=c++11 %s
 // RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
 // RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
+#include <altivec.h>
 
 __vector char vv_c;
 __vector signed char vv_sc;