DiggerLin added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:80
+static bool hasExportListLinkerOpts(const ArgStringList &CmdArgs) {
+  for (size_t i = 0, Size = CmdArgs.size(); i < Size; ++i) {
+    llvm::StringRef ArgString(CmdArgs[i]);
----------------
stevewan wrote:
> Since `!=` is preferred, let's switch to that.
I do not think there is a benefit "i != Size" over "i < Size" 
,https://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop
 
I use the Size = CmdArgs.size() to avoid  the evaluating the CmdArgs.size() 
every time through a loop.


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:88
+    // If we split -b option, check the next opt.
+    if (ArgString == "-b" && i + 1 < CmdArgs.size()) {
+      ++i;
----------------
stevewan wrote:
> 
thanks


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119147

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to