[all-commits] [llvm/llvm-project] 389713: [DWARFLinker] Add CompileUnit::getInfo helper that...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Nov 6 19:38:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3897137598128e64c246a6a604f948fa4e9a5db7
      https://github.com/llvm/llvm-project/commit/3897137598128e64c246a6a604f948fa4e9a5db7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
    M llvm/lib/DWARFLinker/DWARFLinker.cpp

  Log Message:
  -----------
  [DWARFLinker] Add CompileUnit::getInfo helper that takes a DWARFDie (NFC)

Eliminate the need to go through the DIE index by passing the DIE to
CompileUnit::getInfo directly.

Before:

  unsigned Idx = Unit->getOrigUnit().getDIEIndex(Die);
  CompileUnit::DIEInfo &Info = Unit->getInfo(Idx);

After:

  CompileUnit::DIEInfo &Info = Unit->getInfo(Die);




More information about the All-commits mailing list