[PATCH] D130357: [MC,llvm-objdump,ARM] Target-dependent disassembly resync policy.

David Spickett via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 07:29:52 PDT 2022


DavidSpickett accepted this revision.
DavidSpickett added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:186
+  ///                   zero. May be greater than the size of Bytes.
+  virtual uint64_t suggestBytesToSkip(ArrayRef<uint8_t> Bytes,
+                                      uint64_t Address) const;
----------------
simon_tatham wrote:
> DavidSpickett wrote:
> > `const ArrayRef<uint8_t>`?
> No, because firstly, that would only make the tiny `ArrayRef` structure itself const and not the pointed-to data, and secondly, `ArrayRef` is implicitly a pointer-to-const anyway.
> 
> (This too is copied from the previous API functions, so if it had been a bug, they'd have this bug as well.)
Right, I was reading the header as if the non const methods modified the array it's referencing, not the extent of the reference.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130357



More information about the llvm-commits mailing list