mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 09:56:33 +00:00

Many SB classes have public constructors or methods involving types that are private. Some are more obvious (e.g. containing lldb_private in the name) than others (lldb::FooSP is usually std::shared_pointer<lldb_private::Foo>). This commit explicitly does not address FileSP, so I'm leaving that one alone for now. Some of these were for other SB classes to use and should have been made protected/private with a friend class entry added. Some of these were public for some of the swig python helpers to use. I put all of those functions into a class and made them static methods. The relevant SB classes mark that class as a friend so they can access those private/protected members. I've also removed an outdated SBStructuredData test (can you guess which constructor it was using?) and updated the other relevant tests. Differential Revision: https://reviews.llvm.org/D150157