[PATCH] D53051: [llvm-tapi] initial commit, supports ELF text stubs

Armando Montanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 28 19:48:55 PST 2018


amontanez added inline comments.


================
Comment at: llvm/include/llvm/TextAPI/ELF/ELFStub.h:63
+  /// Sorts all symbols by name in ascending order.
+  void sortSymbolsByName();
+};
----------------
ruiu wrote:
> amontanez wrote:
> > ruiu wrote:
> > > Instead of providing this function, you could make `Symbols`s type to `std::set` which is a sorted set.
> > Unfortunately std::set doesn't allow in-place modification of elements, so it won't work with YAML. I'll look into alternative options.
> If a set is sorted by `Name`, and if you don't mutate that string, you are fine, no? You can safely do in-place modification to other members.
Elements of a std::set are const by default. This requires either using const_cast or declaring some members as mutable. I feel there's a cleaner way to do this.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D53051





More information about the llvm-commits mailing list