[flang-commits] [clang] [flang] [flang][nfc] Refactor linker invocation logic (PR #75534)

Michael Klemm via flang-commits flang-commits at lists.llvm.org
Fri Dec 15 06:40:01 PST 2023


================
@@ -1116,73 +1116,87 @@ bool tools::addOpenMPRuntime(ArgStringList &CmdArgs, const ToolChain &TC,
   return true;
 }
 
+/// Determines if --whole-archive is active in the list of arguments.
+static bool isWholeArchivePresent(const ArgList &Args) {
+  bool WholeArchiveActive = false;
+  for (auto *Arg : Args.filtered(options::OPT_Wl_COMMA)) {
+    if (Arg) {
----------------
mjklemm wrote:

Nit (and maybe more a question): The style guide does not use {} when only one statement is nested. Is that true? (Frankly, I like the extra {} better, as it makes adding code easier). 

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


More information about the flang-commits mailing list