1 //===-- ModuleProvider.cpp - Base implementation for module providers -----===//
3 // Minimal implementation of the abstract interface for providing a module.
5 //===----------------------------------------------------------------------===//
7 #include "llvm/ModuleProvider.h"
8 #include "llvm/Module.h"
10 /// ctor - always have a valid Module
12 AbstractModuleProvider::AbstractModuleProvider() {
16 /// dtor - when we leave, we take our Module with us
18 AbstractModuleProvider::~AbstractModuleProvider() {
22 /// materializeFunction - make sure the given function is fully read.
24 void AbstractModuleProvider::materializeModule() {
25 for (Module::iterator i = M->begin(), e = M->end(); i != e; ++i) {
26 materializeFunction(i);