mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-12-12 13:45:48 +00:00
Support both -h, --help on spirv-as, spirv-val
The spirv-dis command already supports both.
This commit is contained in:
parent
d0f80fabbc
commit
e04b935599
@ -44,7 +44,7 @@ is used.
|
||||
|
||||
Options:
|
||||
|
||||
-h Print this help.
|
||||
-h, --help Print this help.
|
||||
|
||||
-o <filename> Set the output filename. Use '-' to mean stdout.
|
||||
--version Display assembler version information.
|
||||
@ -92,6 +92,10 @@ int main(int argc, char** argv) {
|
||||
SPV_SPIRV_VERSION_MINOR, SPV_SPIRV_VERSION_REVISION);
|
||||
return 0;
|
||||
}
|
||||
if (0 == strcmp(argv[argi], "--help")) {
|
||||
print_usage(argv[0]);
|
||||
return 0;
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
print_usage(argv[0]);
|
||||
|
@ -44,7 +44,8 @@ or if the filename is "-", then the binary is read from standard input.
|
||||
NOTE: The validator is a work in progress.
|
||||
|
||||
Options:
|
||||
--version Display validator version information
|
||||
-h, --help Print this help.
|
||||
--version Display validator version information.
|
||||
)",
|
||||
argv0, argv0);
|
||||
}
|
||||
@ -64,6 +65,9 @@ int main(int argc, char** argv) {
|
||||
printf("Target: SPIR-V %d.%d rev %d\n", SPV_SPIRV_VERSION_MAJOR,
|
||||
SPV_SPIRV_VERSION_MINOR, SPV_SPIRV_VERSION_REVISION);
|
||||
return 0;
|
||||
} else if (0 == strcmp(cur_arg, "--help") || 0 == strcmp(cur_arg, "-h")) {
|
||||
print_usage(argv[0]);
|
||||
return 0;
|
||||
} else if (0 == cur_arg[1]) {
|
||||
// Setting a filename of "-" to indicate stdin.
|
||||
if (!inFile) {
|
||||
|
Loading…
Reference in New Issue
Block a user