[Lldb-commits] [PATCH] D99701: [lldb-vscode] Consistently use return EXIT_SUCCESS and EXIT_FAILURE (NFC)
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 31 21:42:18 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG54c3c2e82874: [lldb-vscode] Consistently use return EXIT_SUCCESS and EXIT_FAILURE (NFC) (authored by JDevlieghere).
Herald added a project: LLDB.
Changed prior to commit:
https://reviews.llvm.org/D99701?vs=334585&id=334587#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99701/new/
https://reviews.llvm.org/D99701
Files:
lldb/tools/lldb-vscode/lldb-vscode.cpp
Index: lldb/tools/lldb-vscode/lldb-vscode.cpp
===================================================================
--- lldb/tools/lldb-vscode/lldb-vscode.cpp
+++ lldb/tools/lldb-vscode/lldb-vscode.cpp
@@ -3105,7 +3105,7 @@
} else {
llvm::errs() << "\"--launch-target\" requires \"--comm-file\" to be "
"specified\n";
- exit(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
}
@@ -3118,7 +3118,7 @@
if (input_args.hasArg(OPT_help)) {
printHelp(T, llvm::sys::path::filename(argv[0]));
- return 0;
+ return EXIT_SUCCESS;
}
if (auto *arg = input_args.getLastArg(OPT_port)) {
@@ -3127,7 +3127,7 @@
portno = strtol(optarg, &remainder, 0);
if (remainder == optarg || *remainder != '\0') {
fprintf(stderr, "'%s' is not a valid port number.\n", optarg);
- exit(1);
+ return EXIT_FAILURE;
}
}
@@ -3144,7 +3144,7 @@
g_vsc.input.descriptor = StreamDescriptor::from_socket(socket_fd, true);
g_vsc.output.descriptor = StreamDescriptor::from_socket(socket_fd, false);
} else {
- exit(1);
+ return EXIT_FAILURE;
}
} else {
g_vsc.input.descriptor = StreamDescriptor::from_file(fileno(stdin), false);
@@ -3168,5 +3168,5 @@
// We must terminate the debugger in a thread before the C++ destructor
// chain messes everything up.
lldb::SBDebugger::Terminate();
- return 0;
+ return EXIT_SUCCESS;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99701.334587.patch
Type: text/x-patch
Size: 1435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210401/33ffc2fe/attachment-0001.bin>
More information about the lldb-commits
mailing list