This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Improve CPUInfo test predicate
ClosedPublic

Authored by DavidSpickett on Apr 1 2021, 7:31 AM.

Details

Summary

Use a with block for reading the cpuinfo file.

When loading the file fails (or we're not on Linux)
return an empty string. Since all the callers are
going to do "x in self.getCPUInfo()".

Diff Detail

Event Timeline

DavidSpickett requested review of this revision.Apr 1 2021, 7:31 AM
DavidSpickett created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2021, 7:31 AM
omjavaid accepted this revision.Apr 6 2021, 2:36 AM
This revision is now accepted and ready to land.Apr 6 2021, 2:36 AM
This revision was automatically updated to reflect the committed changes.