-ExecutionEngine *Interpreter::create(ModuleProvider *MP, std::string* ErrStr) {
- // Tell this ModuleProvide to materialize and release the module
- if (!MP->materializeModule(ErrStr))
+ExecutionEngine *Interpreter::create(std::unique_ptr<Module> M,
+ std::string *ErrStr) {
+ // Tell this Module to materialize everything and release the GVMaterializer.
+ if (std::error_code EC = M->materializeAllPermanently()) {
+ if (ErrStr)
+ *ErrStr = EC.message();