nickdesaulniers added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:978-986 + if (Arg *A = Args.getLastArg(options::OPT_g_Flag, options::OPT_gN_Group, + options::OPT_gdwarf_2, options::OPT_gdwarf_3, + options::OPT_gdwarf_4, options::OPT_gdwarf_5, + options::OPT_gdwarf)) + if (!A->getOption().matches(options::OPT_g0)) { + Args.AddLastArg(CmdArgs, options::OPT_g_Flag); + unsigned DwarfVersion = getDwarfVersion(getToolChain(), Args); ---------------- Isn't this potentially going to add `-gdwarf-` repeatedly if there's many inputs? Wouldn't it be better to scan the inputs to see if there's any .S or .s files, then add the flags once? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145726/new/ https://reviews.llvm.org/D145726 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits