1 // RUN: %clang_cc1 -triple thumb-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKPOS %s 2 // RUN: %clang_cc1 -triple thumb-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKNEG %s 3 // RUN: %clang_cc1 -triple arm-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKPOS %s 4 // RUN: %clang_cc1 -triple arm-apple-darwin -emit-llvm -o - %s | FileCheck --check-prefix CHECKNEG %s 5 6 __attribute__((target("arm"))) void test_target_arm() { 7 // CHECKPOS: define void @test_target_arm() [[ARM_ATTRS:#[0-9]+]] 8 // CHECKNEG: define void @test_target_arm() [[ARM_ATTRS:#[0-9]+]] 9 } 10 11 __attribute__((target("thumb"))) void test_target_thumb() { 12 // CHECKPOS: define void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]] 13 // CHECKNEG: define void @test_target_thumb() [[THUMB_ATTRS:#[0-9]+]] 14 } 15 16 // CHECKPOS: attributes [[ARM_ATTRS]] = { {{.*}} "target-features"="{{.*}}-thumb-mode{{.*}}" 17 // CHECKPOS: attributes [[THUMB_ATTRS]] = { {{.*}} "target-features"="{{.*}}+thumb-mode{{.*}}" 18 // CHECKNEG-NOT: attributes [[ARM_ATTRS]] = { {{.*}} "target-features"="{{.*}}+thumb-mode{{.*}}" 19 // CHECKNEG-NOT: attributes [[THUMB_ATTRS]] = { {{.*}} "target-features"="{{.*}}-thumb-mode{{.*}}" 20