[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

Cinhi Young via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 13 01:19:53 PDT 2024


================
@@ -2507,6 +2507,7 @@ static void CollectArgsForIntegratedAssembler(Compilation &C,
   bool Crel = false, ExperimentalCrel = false;
   bool UseRelaxRelocations = C.getDefaultToolChain().useRelaxRelocations();
   bool UseNoExecStack = false;
+  bool Msa = false;
----------------
Cyanoxygen wrote:

BTW using `std::Optional<bool>` makes more sense since it does distinguish between `None` (totally not set) and Boolean `false` (disabled). Your initial thought is that `false` stands for 1) MSA flag is not set and 2) MSA is disabled, but if we target a non-MIPS machine, then we must know if the `-mno-msa` is actually set - that's why using plain `bool` in this context is not a good idea, `false` can not mean two states.

https://github.com/llvm/llvm-project/pull/99615


More information about the cfe-commits mailing list