phosek added inline comments.

================
Comment at: clang/lib/Driver/ToolChain.cpp:237-245
+  // Enumerate boolean flags we care about for the purposes of multilib here.
+  // There must be a smarter way to do it but this gets us started.
+  const struct HasFlag {
+    ID Pos, Neg;
+    bool Default;
+  } HasFlagList[] = {
+      {OPT_fexceptions, OPT_fno_exceptions, true},
----------------
Would it be possible to add this information to 
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Driver/Options.td?
 I think that would be more maintainable.


================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:441
+                               std::vector<StringRef> &Features, bool ForAS,
+                               unsigned *OutFPUKind) {
   bool KernelOrKext =
----------------
Can we use `ARM::FPUKind` as a type here?


================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:556
   // Honor -mfpu=. ClangAs gives preference to -Wa,-mfpu=.
   unsigned FPUID = llvm::ARM::FK_INVALID;
   const Arg *FPUArg = Args.getLastArg(options::OPT_mfpu_EQ);
----------------
Is this variable used anywhere in this function?


================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.h:70
+                          std::vector<llvm::StringRef> &Features, bool ForAS,
+                          unsigned *OutFPUKind = nullptr);
 int getARMSubArchVersionNumber(const llvm::Triple &Triple);
----------------
Using output argument isn't very common in LLVM and even in this particular 
case seems a bit ad-hoc. I'm wondering if we could instead extract this logic 
into a new function, for example `getARMFPUFeatures`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142933

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to