This is an archive of the discontinued LLVM Phabricator instance.

Fix type category matching to source language.
ClosedPublic

Authored by vadimcn on Jun 2 2017, 4:16 PM.

Details

Summary

Use exact equality for category language matching, for all languages, except those specifically mentioned.

Diff Detail

Repository
rL LLVM

Event Timeline

vadimcn created this revision.Jun 2 2017, 4:16 PM

Though... wouldn't "category_lang == valobj_lang" be a sane default behavior for any languages not mentioned specifically below?

granata.enrico resigned from this revision.Jun 2 2017, 6:30 PM

On the surface, that looks correct to me. However I don't work on LLDB anymore and have been out of the loop enough that I don't feel comfortable approving this change. I believe Jim Ingham is Data Formatter Overlord these days.

vadimcn edited reviewers, added: jingham; removed: granata.enrico.Jun 2 2017, 11:09 PM
jingham accepted this revision.Jun 5 2017, 2:47 PM

It does make sense to me that any category language that has a name should by default to be an exact match for the valobj language. If we're going to choose that as a rule, then we should eliminate all the explicitly listed languages that just require an exact match. That will make the code clearer.

It looks like Go has been using the default "all valobj's match" rule. I don't know it that was intentional or not, if somebody who uses Go knows, they should chime in.

This revision is now accepted and ready to land.Jun 5 2017, 2:47 PM
vadimcn updated this revision to Diff 101472.Jun 6 2017, 11:16 AM
vadimcn retitled this revision from Fix type category matching for Rust. to Fix type category matching to source language..
vadimcn edited the summary of this revision. (Show Details)

Rust and Go are not the only missing languages. Looks like all of the newly-added DWARF5 language codes are not covered here.

Yes, the only reason I mentioned Go is that there is actually an lldb Language plugin for Go, but not for any of the other languages, so there's a little more support there to potentially break.

vadimcn closed this revision.Sep 15 2017, 8:56 PM