This is both smaller and faster.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
thanks! maybe put an NFC in the patch name?
clang/lib/Basic/FileManager.cpp | ||
---|---|---|
583 | seems like just formatting change, same for next 2 chunks. |
clang/lib/Basic/FileManager.cpp | ||
---|---|---|
318 | I'm trying to figure out why ReusingEntry was necessary. It looks to me like you could just call UFE->isValid() here and avoid introducing that bool... or am I missing something? |
clang/lib/Basic/FileManager.cpp | ||
---|---|---|
318 | You're right, but I think we can get rid of isValid, and plan to send a patch. A FileEntry handed out by FileManager always has isValid = true. It's not possible to create a useful FileEntry outside FileManager (and this is never done outside FileManagerTest). So the concept of validity isn't needed. (IMO the main cost of having the isValid flag is conceptual complexity - lots of places check it, which means people must be thinking about how to handle this case) |
clang/lib/Basic/FileManager.cpp | ||
---|---|---|
318 | Sure, SGTM. |
I'm trying to figure out why ReusingEntry was necessary. It looks to me like you could just call UFE->isValid() here and avoid introducing that bool... or am I missing something?