Page MenuHomePhabricator

[lldb][NFC] Use StringRef in TypeSystem API (TypeSystem, CompilerType, TypeSystemClang)

Authored by teemperor on May 17 2021, 12:26 AM.



This replaces the C strings in the TypeSystem API with StringRefs. Also removes all the
StringRef locals that were previously used in the implementation as they are no longer necessary.

Diff Detail

Event Timeline

teemperor created this revision.May 17 2021, 12:26 AM
teemperor requested review of this revision.May 17 2021, 12:26 AM
augusto2112 added inline comments.May 17 2021, 6:07 AM

Was this check unnecessary?

teemperor added inline comments.May 17 2021, 6:09 AM

I probably should have commented on this. At the start of the function we already do the same check:

if (!enum_type || ConstString(name).IsEmpty())
  return nullptr;

Still, thanks for the careful review :)

This revision is now accepted and ready to land.May 17 2021, 6:14 AM

(I'm going to land this when I prepared the respective Swift patches)