[PATCH] D76085: [DWARFLinker][dsymutil][NFC] add section index into address range.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 09:45:23 PDT 2020


avl marked 2 inline comments as done.
avl added inline comments.


================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1038-1050
     else if (Die.getTag() == dwarf::DW_TAG_compile_unit) {
-      Addr = Unit.getLowPc();
-      if (Addr == std::numeric_limits<uint64_t>::max())
+      const auto &pc = Unit.getLowPc();
+
+      if (pc != std::numeric_limits<uint64_t>::max())
+        Addr = pc;
+      else
         return 0;
----------------
dblaikie wrote:
> What happened here? (is this change related/necessary for the rest of this patch)
I would remove this and others unrelated changes. 


================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.h:118
               *Mapping.ObjectAddress + Mapping.Size,
-              int64_t(Mapping.BinaryAddress) - *Mapping.ObjectAddress);
+              int64_t(Mapping.BinaryAddress - *Mapping.ObjectAddress)};
       }
----------------
dblaikie wrote:
> Why the change in () here?
It looks like it needs explicit type conversion for braced initialization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76085





More information about the llvm-commits mailing list