[PATCH] D83801: [MC] Pass the section to onSymbolStart() for more context

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 23:17:22 PDT 2020


MaskRay added a comment.

Can you demonstrate how you are going to use the new interface?



================
Comment at: llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:156
   virtual Optional<DecodeStatus>
-  onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef<uint8_t> Bytes,
-                uint64_t Address, raw_ostream &CStream) const;
+  onSymbolStart(SymbolInfoTy &Symbol, const object::SectionRef &Section,
+                uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address,
----------------
Pass object::SectionRef by value. It has 2 words, which is cheaper to copy.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83801





More information about the llvm-commits mailing list