[llvm] [llvm-lit] Unhashable TypeError Support (PR #101590)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 17:23:44 PDT 2024


================
@@ -767,6 +767,13 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
         # echo-appending to a file.
         # FIXME: Standardize on the builtin echo implementation. We can use a
         # temporary file to sidestep blocking pipe write issues.
+
+        # Ensure args[0] is hashable before using it in inproc_builtins
+        if isinstance(args[0], GlobItem):
+            expanded_args = expand_glob(args[0], cmd_shenv.cwd)
----------------
Harini0924 wrote:

I wanted to get your feedback on the recent changes I made. Specifically, I added a check to ensure args[0] is hashable before using it in inproc_builtins. If args[0] is an instance of GlobItem, I'm expanding it to its full path. I wasn't sure if this approach is the most efficient or if there's a better way to resolve the GlobItem TypeError. Any insights or suggestions for improvement would be greatly appreciated!

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


More information about the llvm-commits mailing list