[PATCH] D116128: [clang][driver] Warn when '-mno-outline-atomics' is used with a non-AArch64 triple

Nathan Chancellor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 21 15:00:33 PST 2021


nathanchance added inline comments.


================
Comment at: clang/test/Driver/x86-outline-atomics.c:1-7
+// RUN: %clang -target x86_64 -moutline-atomics -S %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-OUTLINE-ATOMICS
+// CHECK-OUTLINE-ATOMICS: warning: 'x86_64' does not support '-moutline-atomics'; flag ignored [-Woption-ignored]
+// CHECK-OUTLINE-ATOMICS-NOT: "-target-feature" "+outline-atomics"
+
+// RUN: %clang -target x86_64 -mno-outline-atomics -S %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-NO-OUTLINE-ATOMICS
+// CHECK-NO-OUTLINE-ATOMICS: warning: 'x86_64' does not support '-mno-outline-atomics'; flag ignored [-Woption-ignored]
+// CHECK-NO-OUTLINE-ATOMICS-NOT: "-target-feature" "-outline-atomics"
----------------
nickdesaulniers wrote:
> If `clang/test/Driver/aarch64-features.c` is only testing outline atomics, I wonder if this test should actually go in there? @t.p.northover , thoughts? Otherwise LGTM and thanks for the patch!
I did consider that initially but:

1. It does appear to test a few other AArch64 specific things.
2. It seemed weird to add an x86_64 test to an AArch64 file.

No strong opinions though, I'll go along with whatever works and makes the majority happy.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116128/new/

https://reviews.llvm.org/D116128



More information about the cfe-commits mailing list