[llvm-branch-commits] [clang] [compiler-rt] [TySan] A Type Sanitizer (Runtime Library) (PR #76261)

Florian Hahn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Dec 17 03:51:41 PST 2024


================
@@ -0,0 +1,161 @@
+# -*- Python -*-
+
+import os
+import platform
+import re
+
+import lit.formats
+
+# Get shlex.quote if available (added in 3.3), and fall back to pipes.quote if
+# it's not available.
+try:
+    import shlex
+
+    sh_quote = shlex.quote
+except:
+    import pipes
+
+    sh_quote = pipes.quote
+
+
+def get_required_attr(config, attr_name):
+    attr_value = getattr(config, attr_name, None)
+    if attr_value == None:
----------------
fhahn wrote:

Changed to check `if attr_value` and return value early.

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


More information about the llvm-branch-commits mailing list