-/// Helper to load on demand a Module from file and cache it for subsequent
-/// queries. It can be used with the FunctionImporter.
-class ModuleLazyLoaderCache {
- /// The context that will be used for importing.
- LLVMContext &Context;
-
- /// Cache of lazily loaded module for import.
- StringMap<std::unique_ptr<Module>> ModuleMap;
-
-public:
- /// Create the loader, Module will be initialized in \p Context.
- ModuleLazyLoaderCache(LLVMContext &Context) : Context(Context) {}
-
- /// Retrieve a Module from the cache or lazily load it on demand.
- Module &operator()(StringRef FileName);
-};
-