This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Make the g_arguments_data constexpr and fix the static assert
ClosedPublic

Authored by JDevlieghere on Jul 11 2022, 5:55 PM.

Details

Summary

This fixes the static assert that's meant to keep the g_arguments_data table in sync with the CommandArgumentType enumeration. Indeed, the assert didn't fire even though the current code is missing an entry. This patches fixes that as well.

Diff Detail

Event Timeline

JDevlieghere created this revision.Jul 11 2022, 5:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 11 2022, 5:55 PM
JDevlieghere requested review of this revision.Jul 11 2022, 5:55 PM

Ack, sorry I missed adding that one!

Everything else looks fine, but you parsed the enum incorrectly, it's eArgType - RecognizerID. This is in fact a stack-frame recognizer ID. I suggested an appropriate version above.

lldb/source/Interpreter/CommandObject.cpp
1137
This revision was not accepted when it landed; it landed in state Needs Review.Jul 12 2022, 1:12 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2022, 1:12 PM