[clang] [clang][Driver] Support Outline Flags on RISC-V and X86 (PR #163664)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 16 13:56:31 PDT 2025


================
@@ -2916,12 +2916,16 @@ void tools::addMachineOutlinerArgs(const Driver &D,
   if (Arg *A = Args.getLastArg(options::OPT_moutline,
                                options::OPT_mno_outline)) {
     if (A->getOption().matches(options::OPT_moutline)) {
-      // We only support -moutline in AArch64 and ARM targets right now. If
-      // we're not compiling for these, emit a warning and ignore the flag.
-      // Otherwise, add the proper mllvm flags.
-      if (!(Triple.isARM() || Triple.isThumb() || Triple.isAArch64())) {
+      // We only support -moutline in AArch64, ARM, RISC-V and X86 targets right
+      // now. If we're not compiling for these, emit a warning and ignore the
+      // flag. Otherwise, add the proper mllvm flags.
+      if (!(Triple.isARM() || Triple.isThumb() || Triple.isAArch64() ||
----------------
topperc wrote:

Should we swap the if and else body to get rid of this `!`?

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


More information about the cfe-commits mailing list