[PATCH] D66062: [Object] Create MutableELFObject Class for Doing Mutations on ELFObjectFiles [Part 4]
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 22:52:38 PDT 2019
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/Object/MutableELFObject.h:348
+ /// Add symbol \param Sym.
+ void addSymbol(MutableELFSymbol<ELFT> &&Sym) { Symbols.add(std::move(Sym)); }
+
----------------
`void addSymbol(MutableELFSymbol<ELFT> Sym)`
If you don't have a lvalue overload, taking an rvalue is usually inferior to pass-by-value because you'll not able to call addSymbol with a lvalue.
================
Comment at: llvm/include/llvm/Object/MutableELFObject.h:351
+ /// Add section \param Sec.
+ void addSection(MutableELFSection<ELFT> &&Sec) {
+ Sections.add(std::move(Sec));
----------------
`void addSection(MutableELFSection<ELFT> Sym)`
I think the method is self-explanatory. No need for a comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66062/new/
https://reviews.llvm.org/D66062
More information about the llvm-commits
mailing list