[PATCH] D26070: [ELF] Fix fetching source line, when file has multiple "AX" sections

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 31 10:27:42 PDT 2016


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

LGTM



================
Comment at: ELF/InputFiles.cpp:48-49
+public:
+  uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const override;
+  std::unique_ptr<LoadedObjectInfo> clone() const override;
+};
----------------
Both functions are small, so I'd inline them here.


================
Comment at: ELF/InputFiles.cpp:56-57
+
+  const ELFSectionRef &ELFSec = static_cast<const ELFSectionRef &>(Sec);
+  return ELFSec.getOffset();
+}
----------------
You can use `auto` or just `return static_cast<const ELFSectionRef &>(Sec)->getOffset();`.


https://reviews.llvm.org/D26070





More information about the llvm-commits mailing list