Dominik =?utf-8?q?Wójt?= <dominik.w...@arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/81...@github.com>


================
@@ -191,7 +191,11 @@ static void getAArch64MultilibFlags(const Driver &D,
   for (const auto &Ext : AArch64::Extensions)
     if (FeatureSet.contains(Ext.NegFeature))
       MArch.push_back(("no" + Ext.Name).str());
-  MArch.insert(MArch.begin(), ("-march=" + Triple.getArchName()).str());
+  StringRef ArchName;
+  for (const auto &ArchInfo : AArch64::ArchInfos)
+    if (FeatureSet.contains(ArchInfo->ArchFeature))
+      ArchName = ArchInfo->Name;
----------------
mplatings wrote:

What happens if no match is found? What happens if multiple matches are found? 
I suggest some error checking is needed here, even if it's just asserts.

https://github.com/llvm/llvm-project/pull/81474
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to