[PATCH] D91533: [lib/Object] - Generalize the RelocationResolver API.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 19 01:16:31 PST 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/lib/Object/RelocationResolver.cpp:757
+  // contains the addend, provided by the caller.
+  return Resolver(/*Type=*/0, /*Offset=*/0, S, LocData,
+                  R.getRawDataRefImpl().p);
----------------
jhenderson wrote:
> Is it simply not possible to provide Type and Offset information here? Otherwise, this code seems a little fragile to LLD deciding to try to use those fields for something.
Yes, it is not possible without an owning object :(

```
inline uint64_t RelocationRef::getOffset() const {
  return OwningObject->getRelocationOffset(RelocationPimpl);
}

inline uint64_t RelocationRef::getType() const {
  return OwningObject->getRelocationType(RelocationPimpl);
}
```


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

https://reviews.llvm.org/D91533



More information about the llvm-commits mailing list