================
@@ -1448,6 +1448,38 @@ class ASTReader : public ExternalPreprocessorSource,
const StringRef &operator*() && = delete;
};
+public:
+ /// Returns where a loaded module keeps the input file with path \p Path and
+ /// size \p Size, or an invalid \c FID if no loaded module has the file.
+ serialization::InputFileLoc getLoadedFileLoc(StringRef Path, off_t Size);
+
+private:
+ struct LoadedInputFile {
+ off_t Size;
+ ModuleFile *F;
+ unsigned InputID;
+ };
+
+ /// Input files of loaded modules, keyed by resolved path. Built on first
use.
+ llvm::StringMap<SmallVector<LoadedInputFile, 1>> LoadedInputFiles;
+ bool LoadedInputFilesBuilt = false;
----------------
ChuanqiXu9 wrote:
How can an input files not being built? This is ambiguous. Can't we use
`LoadedInputFiles.empty()`?
https://github.com/llvm/llvm-project/pull/209795
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits