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

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 21 14:49:57 PST 2021


nickdesaulniers accepted this revision.
nickdesaulniers added inline comments.
This revision is now accepted and ready to land.


================
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"
----------------
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!


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