[Lldb-commits] [lldb] lldb create API folder if it does not exist, before creating SBLangua… (PR #91128)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Mon May 6 11:40:57 PDT 2024


================
@@ -37,6 +38,10 @@ def emit_enum(input, output):
     with open(input, "r") as f:
         lines = f.readlines()
 
+    # Create output folder if it does not exist
+    if not os.path.isdir(os.path.dirname(output)):
----------------
adrian-prantl wrote:

This can be simplified: https://docs.python.org/3/library/os.html
```suggestion
        os.makedirs(os.path.dirname(output), exist_ok=True)
```

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


More information about the lldb-commits mailing list