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

Armando Montanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 30 14:57:18 PST 2018


amontanez marked 5 inline comments as done.
amontanez added inline comments.


================
Comment at: llvm/include/llvm/TextAPI/ELF/ELFStub.h:63
+  /// Sorts all symbols by name in ascending order.
+  void sortSymbolsByName();
+};
----------------
amontanez wrote:
> 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.
I realized that since I'm using CustomMappingTraits I can populate an ELFSymbol before inserting it into the set.


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