[PATCH] D19977: [ELF] - Move section factory out from writer to make it reusable.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 14:03:30 PDT 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: ELF/OutputSections.cpp:1812-1824
@@ +1811,15 @@
+  return SectionKey<Is64Bits>{DenseMapInfo<StringRef>::getEmptyKey(), 0, 0, 0};
+}
+template <bool Is64Bits>
+typename lld::elf::SectionKey<Is64Bits>
+DenseMapInfo<lld::elf::SectionKey<Is64Bits>>::getTombstoneKey() {
+  return SectionKey<Is64Bits>{DenseMapInfo<StringRef>::getTombstoneKey(), 0, 0,
+                              0};
+}
+template <bool Is64Bits>
+unsigned
+DenseMapInfo<lld::elf::SectionKey<Is64Bits>>::getHashValue(const Key &Val) {
+  return hash_combine(Val.Name, Val.Type, Val.Flags, Val.Alignment);
+}
+template <bool Is64Bits>
+bool DenseMapInfo<lld::elf::SectionKey<Is64Bits>>::isEqual(const Key &LHS,
----------------
Add blank lines between function definitions.

================
Comment at: ELF/OutputSections.h:735
@@ +734,2 @@
+
+#endif // LLD_ELF_OUTPUT_SECTIONS_Hlld::elf::SectionKey<Is64Bits>
----------------
Remove comment.


http://reviews.llvm.org/D19977





More information about the llvm-commits mailing list