[PATCH] D26928: Object: Simplify the IRObjectFile symbol iterator implementation.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 16:49:58 PST 2016


pcc added inline comments.


================
Comment at: llvm/include/llvm/Object/IRObjectFile.h:32
   std::unique_ptr<Mangler> Mang;
-  std::vector<std::pair<std::string, uint32_t>> AsmSymbols;
+  typedef std::pair<std::string, uint32_t> AsmSymbol;
+  SpecificBumpPtrAllocator<AsmSymbol> AsmSymbols;
----------------
mehdi_amini wrote:
> I haven't tracked how the AsmSymbol are passed in, but couldn't we keep a StringRef instead of a std::string?
> (I know it is not directly related to your patch)
These strings are owned by the StringMap in RecordStreamer, so we can't.


https://reviews.llvm.org/D26928





More information about the llvm-commits mailing list