[clang] [clang][modules] Move `SLocEntry` search into `ASTReader` (PR #66966)
Jan Svoboda via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 2 15:32:21 PDT 2023
================
@@ -864,74 +864,7 @@ FileID SourceManager::getFileIDLocal(SourceLocation::UIntTy SLocOffset) const {
/// This function knows that the SourceLocation is in a loaded buffer, not a
/// local one.
FileID SourceManager::getFileIDLoaded(SourceLocation::UIntTy SLocOffset) const {
- if (SLocOffset < CurrentLoadedOffset) {
- assert(0 && "Invalid SLocOffset or bad function choice");
----------------
jansvoboda11 wrote:
It would probably fail to find the offset in `ASTReader::GlobalSLocOffsetMap` and fail with more generic error. I'll add this back.
https://github.com/llvm/llvm-project/pull/66966
More information about the cfe-commits
mailing list