aaron.ballman added a comment.

Thanks for working on this!

I think the same is true for `SourceManager::isInFileID()` as well, right? (Or 
any other place that calls `getSLocEntry()` and doesn't check whether the entry 
is invalid, which also seems to happen a fair amount in SourceManager.cpp.)

Given that this code is on the hot path, should it be the caller's 
responsibility to have already validated the `FileID` that's passed in so that 
the fake entry can never be returned? If not and we really do need the extra 
branch here (and potentially elsewhere), I'd like to see how this impacts 
compile time performance on something like 
http://llvm-compile-time-tracker.com/ to know what we're signing up for.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130847/new/

https://reviews.llvm.org/D130847

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to