| Index: src/llvm2ice.cpp
|
| diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp
|
| index f95c02eef428d02cd39c3d939639007df7096b23..fbf5e23ad984bf47a77ac816764632c61afb05db 100644
|
| --- a/src/llvm2ice.cpp
|
| +++ b/src/llvm2ice.cpp
|
| @@ -135,9 +135,20 @@ static cl::opt<bool>
|
| UseIntegratedAssembler("integrated-as",
|
| cl::desc("Use integrated assembler (default yes)"),
|
| cl::init(true));
|
| +
|
| static cl::alias UseIas("ias", cl::desc("Alias for -integrated-as"),
|
| cl::NotHidden, cl::aliasopt(UseIntegratedAssembler));
|
|
|
| +static cl::opt<bool> AlwaysExitSuccess(
|
| + "exit-success", cl::desc("Exit with success status, even if errors found"),
|
| + cl::init(false));
|
| +
|
| +static int GetReturnValue(int Val) {
|
| + if (AlwaysExitSuccess)
|
| + return 0;
|
| + return Val;
|
| +}
|
| +
|
| int main(int argc, char **argv) {
|
|
|
| cl::ParseCommandLineOptions(argc, argv);
|
| @@ -192,7 +203,7 @@ int main(int argc, char **argv) {
|
|
|
| if (!Mod) {
|
| Err.print(argv[0], errs());
|
| - return 1;
|
| + return GetReturnValue(1);
|
| }
|
|
|
| Ice::Converter Converter(Mod, &Ctx, Flags);
|
| @@ -203,5 +214,5 @@ int main(int argc, char **argv) {
|
| Ctx.dumpTimers();
|
| const bool FinalStats = true;
|
| Ctx.dumpStats("_FINAL_", FinalStats);
|
| - return ErrorStatus;
|
| + return GetReturnValue(ErrorStatus);
|
| }
|
|
|