[PATCH] D144190: [AIX][clang] Storage Locations for Constant Pointers

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 15:07:59 PDT 2023


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:125
 
+  // `-mroptr` implies the `-bforceimprw` linker option.
+  // The `-mroptr` option places constants in RO sections as much as possible.
----------------
Delete `// `-mroptr` implies the `-bforceimprw` linker option.` It just repeats what the code does. Comments focus more on why/how and less on what (unless the code is very complex and explaining "what" from a high level helps).


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:130
+  if (Args.hasFlag(options::OPT_mroptr, options::OPT_mno_roptr, false)) {
+    CmdArgs.push_back("-bforceimprw");
+  }
----------------
drop braces https://llvm.org/docs/CodingStandards.html#don-t-use-braces-on-simple-single-statement-bodies-of-if-else-loop-statements


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144190



More information about the cfe-commits mailing list