r185544 - Fix PR16454: Don't #include altivec.h when preprocessing assembly.

Bill Schmidt wschmidt at linux.vnet.ibm.com
Wed Jul 3 10:49:40 PDT 2013


On Wed, 2013-07-03 at 10:43 -0700, Richard Smith wrote:
> On Wed, Jul 3, 2013 at 10:43 AM, Richard Smith <richard at metafoo.co.uk> wrote:
> > On Wed, Jul 3, 2013 at 8:36 AM, Bill Schmidt
> > <wschmidt at linux.vnet.ibm.com> wrote:
> >> Author: wschmidt
> >> Date: Wed Jul  3 10:36:02 2013
> >> New Revision: 185544
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=185544&view=rev
> >> Log:
> >> Fix PR16454: Don't #include altivec.h when preprocessing assembly.
> >>
> >> When the -maltivec flag is present, altivec.h is auto-included for the
> >> compilation.  This is not appropriate when the job action is to
> >> preprocess a file containing assembly code.  So don't do that.
> >>
> >> I was unable to convert the test in the bug report into a regression
> >> test.  The original symptom was exposed with:
> >>
> >>   % touch x.S
> >>   % ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S
> >>
> >> I tried this test (and numerous variants) on a PPC64 system:
> >>
> >> ----------------------------------------------------------------------------
> >> // RUN: touch %t
> >> // RUN: %clang -maltivec -S %t -o - | FileCheck %s
> >
> > This %t won't be treated as a temporary file. Why are you creating a
> 
> s/temporary/assembly/, oops!

Thanks, Richard, that makes sense.  I'll get that working and check in
the test case shortly.

Bill

> 
> > new file here? Just use the source file containing the RUN: lines as
> > input:
> >
> > $ cat pr16454.S
> > // RUN: %clang -target powerpc64-linux-gnu -maltivec -S %s -o - | FileCheck %s
> > // CHECK-NOT: vector
> > $ lit !$
> > [...]
> > <stdin>:6:8: error: CHECK-NOT: string occurred!
> > static vector signed char __attribute__((__overloadable__, __always_inline__))
> >        ^
> 





More information about the cfe-commits mailing list