[PATCH] D98313: [lld-macho][NFC] when reasonable, replace auto keyword with type names

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 20:32:08 PST 2021


gkm created this revision.
gkm added a reviewer: lld-macho.
Herald added subscribers: steven_wu, hiraditya.
Herald added a reviewer: int3.
Herald added a project: lld-macho.
gkm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

lld policy discourages `auto`. Replace it with a type name whenever reasonable. Retain `auto` to avoid ...

- redundancy, as for decls such as `auto *t = mumble_cast<TYPE *>` or similar that specifies the result type on the RHS
- verbosity, as for iterators
- gratuitous suffering, as for lambdas

Along the way, add `const` when appropriate.

Note: a future diff will ...

- add more `const` qualifiers
- remove `opt::` when we are already `using llvm::opt`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98313

Files:
  lld/MachO/Driver.cpp
  lld/MachO/DriverUtils.cpp
  lld/MachO/InputFiles.cpp
  lld/MachO/InputSection.cpp
  lld/MachO/LTO.cpp
  lld/MachO/SymbolTable.cpp
  lld/MachO/SyntheticSections.cpp
  lld/MachO/UnwindInfoSection.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98313.329521.patch
Type: text/x-patch
Size: 12837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210310/9395d9f8/attachment.bin>


More information about the llvm-commits mailing list