This is an archive of the discontinued LLVM Phabricator instance.

Replace pointer to C-array of PropertyDefinition with llvm::ArrayRef
ClosedPublic

Authored by tatyana-krasnukha on Sep 26 2018, 1:40 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

clayborg accepted this revision.Sep 26 2018, 2:06 PM

Good stuff!

This revision is now accepted and ready to land.Sep 26 2018, 2:06 PM

It would be nice if You could replace the logic that iterates these arrays.
We no longer need to terminate on a sentinel nullptr entry and can now use
range based for loop

Hmm... There is no such logic left, isn't it?
If you mean iterating OptionValueProperties::m_properties vector, I can replace cycles with range based for loop, but this doesn't seem to be related to these changes.

You might be right, I’m on mobile so hard for me to review. I saw a bunch
of nullptr so assumed it was still using sentinel values for iterating. If
not, ignore my suggestion

tatyana-krasnukha added a comment.EditedSep 26 2018, 4:40 PM

It seems you are speaking about OptionDefinition, not PropertyDefinition. I was going to create a separate revision for it. Should I add OptionDefinition-related changes here?

No, separate revision is fine. Thanks!

This revision was automatically updated to reflect the committed changes.