[llvm] [lit] Implement builtin umask (PR #94621)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 08:00:05 PDT 2024


================
@@ -565,6 +566,18 @@ class SHFILEOPSTRUCTW(Structure):
     return ShellCommandResult(cmd, "", stderr.getvalue(), exitCode, False)
 
 
+def executeBuiltinUmask(cmd, shenv):
+    """executeBuiltinUmask - Change the current umask."""
+    if len(cmd.args) != 2:
+        raise InternalShellError(cmd, "'umask' supports only one argument")
----------------
jayfoad wrote:

In this patch I was just being consistent with the other builtins that check the number of arguments. I have no objection to changing the wording for all of them, in a different patch.

https://github.com/llvm/llvm-project/pull/94621


More information about the llvm-commits mailing list