Page MenuHomePhabricator

Add SBType::GetEnumerationIntegerType method
ClosedPublic

Authored by werat on Dec 22 2020, 6:07 AM.

Details

Summary

Add a method for getting the enumeration underlying type.

Diff Detail

Event Timeline

werat requested review of this revision.Dec 22 2020, 6:07 AM
werat created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2020, 6:07 AM
werat added a subscriber: jarin.
werat added inline comments.
lldb/test/API/python_api/type/TestTypeList.py
156

Afaik this is implementation defined, so maybe this we shouldn't test this.

JDevlieghere added inline comments.Dec 22 2020, 9:28 AM
lldb/source/API/SBType.cpp
348

You also need to register the new method. You can add the instrumentation automatically with the lldb-instr tool if you remove this line (and the LLDB_RECORD_RESULT or the return value will get wrapped again).

lldb/test/API/python_api/type/TestTypeList.py
156

Yeah, I would either remove it or add a comment saying that it's implementation defined in case someone (downstream) runs into this.

werat updated this revision to Diff 313379.Dec 22 2020, 10:01 AM

Register the new method using lldb-instr.

werat updated this revision to Diff 313380.Dec 22 2020, 10:03 AM
werat marked an inline comment as done.

Remove the test case for unscoped enum, because it's implementation defined and can break any moment.

This revision is now accepted and ready to land.Dec 22 2020, 10:03 AM
werat added inline comments.Dec 22 2020, 10:04 AM
lldb/source/API/SBType.cpp
348

Thanks, done!

lldb/test/API/python_api/type/TestTypeList.py
156

I've removed the test case to avoid potential confusion.

Thanks for a quick review! Can you please land these changes for me since I don't have commit access.

This revision was landed with ongoing or failed builds.Dec 22 2020, 10:08 AM
This revision was automatically updated to reflect the committed changes.