mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-25 13:05:04 +00:00

LLDB's implementation of DWARFDataExtractor has a method that returns a llvm::DWARFDataExtractor. In some cases, like DebugNamesDWARFIndex::Create, we were passing an LLVM::DWARFDataExtractor to a function that expects a LLVM:DataExtractor by value. This is causing slicing of the derived class. While slicing is not inherently bad, it can be dangerous if the constructor of the derived class mutates the base class in a way that leaves it in an invalid state after slicing. Differential Revision: https://reviews.llvm.org/D153913