mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-03-03 08:02:41 +00:00

Change the internal storage scheme from storing a MutableArrayRef to storing an explicit offset+length pair. Storing an ArrayRef is dangerous because it contains the pointer to the first element in the range, but the entire storage vector may be reallocated, making the pointer dangling. We don't know when the reallocation happends, so we can't update the ArrayRefs. Store the explicit offset instead and construct ArrayRefs on-the-fly. Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D146239
Multi-Level Intermediate Representation
See https://mlir.llvm.org/ for more information.