TSan now has the ability to report races on "external" object, i.e. any library class/object that has read-shared write-exclusive threading semantics. The detection and reporting work almost out of the box, but TSan can now provide the type of the object (as a string). This patch implements this into LLDB.
This is a new API in the TSan dylib, and we should still support cases the old dylib (that don't have the API), so the expression contains a call to dlsym to see if the new API is available or not. Let me know if there's a better solution.