[PATCH] D155407: [Driver] Warn about all instances -mios-version-min not just the last

Cassie Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 16 16:46:26 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf7ad7d147b9c: [Driver] Warn about all instances -mios-version-min not just the last (authored by porglezomp).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155407

Files:
  clang/lib/Driver/ToolChains/Darwin.cpp
  clang/test/Driver/macho-embedded.c


Index: clang/test/Driver/macho-embedded.c
===================================================================
--- clang/test/Driver/macho-embedded.c
+++ clang/test/Driver/macho-embedded.c
@@ -7,6 +7,7 @@
 // RUN: %clang -arch armv7em -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED
 
 // RUN: %clang -arch armv7m --target=thumbv7-apple-ios -mios-version-min=5 -fdriver-only -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-DIAG
+// RUN: %clang -arch armv7m --target=thumbv7-apple-ios -mios-version-min=5 -mios-version-min=5 -fdriver-only -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-DIAG
 
 // CHECK-IOS: "-triple" "thumbv7" "thumbv7-apple-ios
 
Index: clang/lib/Driver/ToolChains/Darwin.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Darwin.cpp
+++ clang/lib/Driver/ToolChains/Darwin.cpp
@@ -87,7 +87,7 @@
       ArchKind == llvm::ARM::ArchKind::ARMV7EM) {
     // Don't reject -mios-version-min= if we have an iOS triple.
     if (T.isiOS())
-      if (Arg *A = Args.getLastArgNoClaim(options::OPT_mios_version_min_EQ))
+      for (Arg *A : Args.filtered(options::OPT_mios_version_min_EQ))
         A->ignoreTargetSpecific();
 
     T.setOS(llvm::Triple::UnknownOS);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155407.540835.patch
Type: text/x-patch
Size: 1304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230716/67278989/attachment.bin>


More information about the cfe-commits mailing list