[all-commits] [llvm/llvm-project] 26aa20: Use range-based for to iterate over fields in reco...

Reid Kleckner via All-commits all-commits at lists.llvm.org
Thu Jan 9 11:21:26 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 26aa20a3dd82e2ff5855bee04b22b35f6b1f026f
      https://github.com/llvm/llvm-project/commit/26aa20a3dd82e2ff5855bee04b22b35f6b1f026f
  Author: Reid Kleckner <rnk at google.com>
  Date:   2025-01-09 (Thu, 09 Jan 2025)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/RecordLayoutBuilder.cpp
    M clang/lib/CodeGen/CGRecordLayoutBuilder.cpp

  Log Message:
  -----------
  Use range-based for to iterate over fields in record layout, NFCI (#122029)

Move the common case of FieldDecl::getFieldIndex() inline to mitigate
the cost of removing the extra `FieldNo` induction variable.

Also rename isNoUniqueAddress parameter to isNonVirtualBaseType, which
appears to be more accurate. I think the current name is just a
consequence of autocomplete gone wrong.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list