[PATCH] D14674: [RuntimeDyld] Add accessors to `SectionEntry`; NFC

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 11:52:44 PST 2015


andrew.w.kaylor added a comment.

Just a few more cases that could be cleaned up.


================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1282
@@ -1267,5 +1281,3 @@
       }
-      resolveRelocation(Section, Offset,
-                        (uint64_t)Section.Address + Section.StubOffset, RelType,
-                        0);
-      Section.StubOffset += getMaxStubSize();
+      resolveRelocation(Section, Offset, (uint64_t)Section.getAddress() +
+                                             Section.getStubOffset(),
----------------
C-style cast and could be getAddressWithOffset(Section.getStubOffset())

================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1298
@@ +1297,3 @@
+        resolveRelocation(Section, Offset,
+                          (uint64_t)Section.getAddressWithOffset(i->second),
+                          RelType, 0);
----------------
C-style cast

================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1314
@@ -1298,5 +1313,3 @@
 
-        resolveRelocation(Section, Offset,
-          (uint64_t)Section.Address + Section.StubOffset, RelType,
-          0);
-        Section.StubOffset += getMaxStubSize();
+        resolveRelocation(Section, Offset, (uint64_t)Section.getAddress() +
+                                               Section.getStubOffset(),
----------------
C-style cast and could be getAddressWithOffset(Section.getStubOffset()).

================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1481
@@ -1463,2 +1480,3 @@
           resolveRelocation(Section, Offset,
-                            (uint64_t)Section.Address + i->second, RelType, 0);
+                            (uint64_t)Section.getAddress() + i->second, RelType,
+                            0);
----------------
C-style cast and could use getAddressWithOffset

================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1525
@@ +1524,3 @@
+              Section, Offset,
+              (uint64_t)Section.getAddressWithOffset(Section.getStubOffset()),
+              RelType, 0);
----------------
C-style cast


http://reviews.llvm.org/D14674





More information about the llvm-commits mailing list