[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 23:36:32 PDT 2024


================
@@ -321,6 +321,11 @@ class ELFFile {
 
   std::vector<Elf_Rel> decode_relrs(Elf_Relr_Range relrs) const;
 
+  uint64_t crelHeader(ArrayRef<uint8_t> Content) const;
+  using RelsOrRelas = std::pair<std::vector<Elf_Rel>, std::vector<Elf_Rela>>;
----------------
MaskRay wrote:

Yes, `std::pair<` instead of an exclusive or is for convenience.

This is a type alias in a class (ELFFile) used by llvm-readobj. lld/ELF doesn't use this class, and the name collision should be fine.

https://github.com/llvm/llvm-project/pull/91280


More information about the cfe-commits mailing list