Page MenuHomePhabricator

Add SBValue::TypeIsReferenceType to SB API.

Authored by chaoren on Jul 27 2015, 12:02 PM.



Diff Detail

Event Timeline

chaoren retitled this revision from to Add SBValue::TypeIsReferenceType to SB API..
chaoren updated this object.
chaoren added a reviewer: clayborg.
chaoren added a subscriber: lldb-commits.

Is SBType::GetTypeClass not good enough?
That said, the aim of this change is not very clear to me. If SBType::GetTypeClass is sufficient, then having another way to figure whether a value is of a reference type is probably a bloat to the API.

Another, may be unrelated but could be relevant, point is whether you want this new method to see through typedefs.

chaoren abandoned this revision.EditedJul 27 2015, 12:51 PM

Whoops, sorry. I saw there was a TypeIsPointerType, but not one for references. Yeah, GetType().IsReferenceType() would be identical, so this is unnecessary. TypeIsPointerType seems pretty unnecessary now too.

clayborg edited edge metadata.Jul 27 2015, 2:11 PM

API was added that should never have made it into the SB API:


SBValue::TypeIsPointerType ();
This led to others seeing this code and thinking it was OK. Now that the above function is in our API we can't remove it, but we should encourage the use of SBValue::GetType().XXX() from here on out.