diff --git a/include/llvm/Support/ErrorHandling.h b/include/llvm/Support/ErrorHandling.h index 4d24ada48eb..22325780161 100644 --- a/include/llvm/Support/ErrorHandling.h +++ b/include/llvm/Support/ErrorHandling.h @@ -25,7 +25,7 @@ namespace llvm { typedef void (*llvm_error_handler_t)(void *user_data, const std::string& reason); - /// llvm_instal_error_handler - Installs a new error handler to be used + /// llvm_install_error_handler - Installs a new error handler to be used /// whenever a serious (non-recoverable) error is encountered by LLVM. /// /// If you are using llvm_start_multithreaded, you should register the handler diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 6ca35ac0260..d496bf73fa9 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -1293,9 +1293,8 @@ void FunctionPassManager::add(Pass *P) { bool FunctionPassManager::run(Function &F) { if (F.isMaterializable()) { std::string errstr; - if (F.Materialize(&errstr)) { + if (F.Materialize(&errstr)) llvm_report_error("Error reading bitcode file: " + errstr); - } } return FPM->run(F); }