Add helpers getSLocEntryOrNull, which handles the Invalid logic around getSLocEntry, and getSLocEntryForFile, which also checks for SLocEntry::isFile, and use them to reduce repeated code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
dexonsmith added a child revision: D89488: FileManager: Shrink FileEntryRef to the size of a pointer.
dexonsmith edited child revisions, added: D89507: SourceManager: Change SourceManager::isMainFile to take a FileEntry, NFC; removed: D89488: FileManager: Shrink FileEntryRef to the size of a pointer.Oct 15 2020, 3:35 PM
This revision is now accepted and ready to land.Oct 21 2020, 10:48 PM
Closed by commit rGb6c6daa95d3a: SourceManager: Factor out helpers for common SLocEntry lookup pattern, NFC (authored by dexonsmith). · Explain WhyOct 22 2020, 6:31 PM
This revision was automatically updated to reflect the committed changes.