[PATCH] D90873: [DWARFLinker] Convert analyzeContextInfo to a work list (NFC)

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 13:33:21 PST 2020


avl added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:261
+  unsigned ParentIdx = 0;
+  bool InImportedModule;
+
----------------
nit: it is good to initialize InImportedModule and Type also: InImportedModule = false; Type = ContextWorklistItemType::AnalyzeContextInfo;


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:300
+  unsigned Idx = CU.getOrigUnit().getDIEIndex(Die);
+  CompileUnit::DIEInfo &Info = CU.getInfo(Idx);
+  Info.Prune &= ChildInfo.Prune;
----------------
This is repeated many times:

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

Probably, it makes sence to add helper function to CompileUnit?

CU.getInfo(Die)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90873



More information about the llvm-commits mailing list