File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ TypeInfo ParseTypeInfoJSON(const llvm::json::Object &obj) {
2525 if (auto v = obj.getBoolean (" is_unsafe_pointer" ))
2626 info.is_unsafe_pointer = *v;
2727 assert (!(info.is_refcount_pointer && info.is_unsafe_pointer ));
28+ if (auto *arr = obj.getArray (" derives" )) {
29+ for (const auto &elem : *arr) {
30+ if (auto s = elem.getAsString ())
31+ info.derives .emplace_back (s->str ());
32+ }
33+ }
2834 return info;
2935}
3036
@@ -329,6 +335,8 @@ void TypeInfo::dump() const {
329335 log () << " [rc_ptr]" ;
330336 if (is_unsafe_pointer)
331337 log () << " [unsafe_ptr]" ;
338+ for (const auto &d : derives)
339+ log () << " +" << d;
332340}
333341
334342void TypeRule::dump () const {
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ struct TypeInfo {
5757 std::string type;
5858 bool is_refcount_pointer = false ;
5959 bool is_unsafe_pointer = false ;
60+ std::vector<std::string> derives;
6061
6162 bool is_pointer () const { return is_refcount_pointer || is_unsafe_pointer; }
6263
You can’t perform that action at this time.
0 commit comments