| 1132 | } |
| 1133 | |
| 1134 | Status LlvmCodeGen::MaterializeModule() { |
| 1135 | llvm::Error err = module_->materializeAll(); |
| 1136 | if (UNLIKELY(err)) { |
| 1137 | string err_string; |
| 1138 | llvm::handleAllErrors( |
| 1139 | move(err), [&](llvm::ErrorInfoBase& eib) { err_string = eib.message(); }); |
| 1140 | return Status(Substitute("Failed to materialize module $0: $1", |
| 1141 | module_->getName().str(), err_string)); |
| 1142 | } |
| 1143 | return Status::OK(); |
| 1144 | } |
| 1145 | |
| 1146 | // It's okay to call this function even if the module has been materialized. |
| 1147 | Status LlvmCodeGen::FinalizeLazyMaterialization() { |