ldrumm updated this revision to Diff 377864. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111315/new/
https://reviews.llvm.org/D111315 Files: clang/lib/Interpreter/Interpreter.cpp Index: clang/lib/Interpreter/Interpreter.cpp =================================================================== --- clang/lib/Interpreter/Interpreter.cpp +++ clang/lib/Interpreter/Interpreter.cpp @@ -31,6 +31,7 @@ #include "llvm/IR/Module.h" #include "llvm/Support/Host.h" +#include "llvm/Support/Errc.h" using namespace clang; @@ -47,14 +48,14 @@ // failed. Extract that job from the Compilation. const driver::JobList &Jobs = Compilation->getJobs(); if (!Jobs.size() || !isa<driver::Command>(*Jobs.begin())) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Driver initialization failed. " "Unable to create a driver job"); // The one job we find should be to invoke clang again. const driver::Command *Cmd = cast<driver::Command>(&(*Jobs.begin())); if (llvm::StringRef(Cmd->getCreator().getName()) != "clang") - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Driver initialization failed"); return &Cmd->getArguments(); @@ -89,13 +90,13 @@ // Create the actual diagnostics engine. Clang->createDiagnostics(); if (!Clang->hasDiagnostics()) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::not_enough_memory, "Initialization failed. " "Unable to create diagnostics engine"); DiagsBuffer->FlushDiagnostics(Clang->getDiagnostics()); if (!Success) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Initialization failed. " "Unable to flush diagnostics"); @@ -106,7 +107,7 @@ Clang->setTarget(TargetInfo::CreateTargetInfo( Clang->getDiagnostics(), Clang->getInvocation().TargetOpts)); if (!Clang->hasTarget()) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::not_supported, "Initialization failed. " "Target is missing");
Index: clang/lib/Interpreter/Interpreter.cpp =================================================================== --- clang/lib/Interpreter/Interpreter.cpp +++ clang/lib/Interpreter/Interpreter.cpp @@ -31,6 +31,7 @@ #include "llvm/IR/Module.h" #include "llvm/Support/Host.h" +#include "llvm/Support/Errc.h" using namespace clang; @@ -47,14 +48,14 @@ // failed. Extract that job from the Compilation. const driver::JobList &Jobs = Compilation->getJobs(); if (!Jobs.size() || !isa<driver::Command>(*Jobs.begin())) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Driver initialization failed. " "Unable to create a driver job"); // The one job we find should be to invoke clang again. const driver::Command *Cmd = cast<driver::Command>(&(*Jobs.begin())); if (llvm::StringRef(Cmd->getCreator().getName()) != "clang") - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Driver initialization failed"); return &Cmd->getArguments(); @@ -89,13 +90,13 @@ // Create the actual diagnostics engine. Clang->createDiagnostics(); if (!Clang->hasDiagnostics()) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::not_enough_memory, "Initialization failed. " "Unable to create diagnostics engine"); DiagsBuffer->FlushDiagnostics(Clang->getDiagnostics()); if (!Success) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::io_error, "Initialization failed. " "Unable to flush diagnostics"); @@ -106,7 +107,7 @@ Clang->setTarget(TargetInfo::CreateTargetInfo( Clang->getDiagnostics(), Clang->getInvocation().TargetOpts)); if (!Clang->hasTarget()) - return llvm::createStringError(std::errc::state_not_recoverable, + return llvm::createStringError(llvm::errc::not_supported, "Initialization failed. " "Target is missing");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits