Author: olista01 Date: Thu Sep 15 03:55:41 2016 New Revision: 281596 URL: http://llvm.org/viewvc/llvm-project?rev=281596&view=rev Log: [ARM] ARM-specific attributes should be accepted for big-endian
The ARM-specific C attributes (currently just interrupt) need to check for both the big- and little-endian versions of the triples, so that they are accepted for both big and little endian targets. TargetWindows and TargetMicrosoftCXXABI also only use the little-endian triples, but this is correct as windows is not supported on big-endian ARM targets (and this is asserted in lib/Basic/Targets.cpp). Differential Revision: https://reviews.llvm.org/D24245 Modified: cfe/trunk/include/clang/Basic/Attr.td cfe/trunk/test/Sema/arm-interrupt-attr.c Modified: cfe/trunk/include/clang/Basic/Attr.td URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=281596&r1=281595&r2=281596&view=diff ============================================================================== --- cfe/trunk/include/clang/Basic/Attr.td (original) +++ cfe/trunk/include/clang/Basic/Attr.td Thu Sep 15 03:55:41 2016 @@ -254,7 +254,7 @@ class TargetArch<list<string> arches> { list<string> OSes; list<string> CXXABIs; } -def TargetARM : TargetArch<["arm", "thumb"]>; +def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>; def TargetMips : TargetArch<["mips", "mipsel"]>; def TargetMSP430 : TargetArch<["msp430"]>; def TargetX86 : TargetArch<["x86"]>; Modified: cfe/trunk/test/Sema/arm-interrupt-attr.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/arm-interrupt-attr.c?rev=281596&r1=281595&r2=281596&view=diff ============================================================================== --- cfe/trunk/test/Sema/arm-interrupt-attr.c (original) +++ cfe/trunk/test/Sema/arm-interrupt-attr.c Thu Sep 15 03:55:41 2016 @@ -1,4 +1,7 @@ // RUN: %clang_cc1 %s -triple arm-apple-darwin -verify -fsyntax-only +// RUN: %clang_cc1 %s -triple thumb-apple-darwin -verify -fsyntax-only +// RUN: %clang_cc1 %s -triple armeb-none-eabi -verify -fsyntax-only +// RUN: %clang_cc1 %s -triple thumbeb-none-eabi -verify -fsyntax-only __attribute__((interrupt(IRQ))) void foo() {} // expected-error {{'interrupt' attribute requires a string}} __attribute__((interrupt("irq"))) void foo1() {} // expected-warning {{'interrupt' attribute argument not supported: irq}} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits