[all-commits] [llvm/llvm-project] 28050e: [lldb][DWARFASTParser] Don't pass CompilerType by ...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Aug 13 12:04:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28050e1b0b9da6d9c24ba20e8c70cf90b8135f49
      https://github.com/llvm/llvm-project/commit/28050e1b0b9da6d9c24ba20e8c70cf90b8135f49
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2024-08-13 (Tue, 13 Aug 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h

  Log Message:
  -----------
  [lldb][DWARFASTParser] Don't pass CompilerType by non-const reference in the DWARFASTParserClang APIs (#103245)

The `CompilerType` is just a wrapper around two pointers, and there is
no usage of the `CompilerType` where those are expected to change
underneath the caller.

To make the interface more straightforward to reason about, this patch
changes all instances of `CompilerType&` to `const CompilerType&` around
the `DWARFASTParserClang` APIs.

We could probably pass these by-value, but all other APIs don't, and
this patch just makes the parameter passing convention consistent with
the rest of the file.



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