[Lldb-commits] [lldb] dbcfa29 - lldb create API folder if it does not exist, before creating SBLangua… (#91128)
via lldb-commits
lldb-commits at lists.llvm.org
Wed May 8 10:57:20 PDT 2024
Author: Nicklas Boman
Date: 2024-05-08T10:57:16-07:00
New Revision: dbcfa2957d9f99de62fc86db12a857caf929583c
URL: https://github.com/llvm/llvm-project/commit/dbcfa2957d9f99de62fc86db12a857caf929583c
DIFF: https://github.com/llvm/llvm-project/commit/dbcfa2957d9f99de62fc86db12a857caf929583c.diff
LOG: lldb create API folder if it does not exist, before creating SBLangua… (#91128)
Create API folder if it does not exist, before creating SBLanguages.h
Added:
Modified:
lldb/scripts/generate-sbapi-dwarf-enum.py
Removed:
################################################################################
diff --git a/lldb/scripts/generate-sbapi-dwarf-enum.py b/lldb/scripts/generate-sbapi-dwarf-enum.py
index 464eb2afff7d6..f7a13e5efffef 100755
--- a/lldb/scripts/generate-sbapi-dwarf-enum.py
+++ b/lldb/scripts/generate-sbapi-dwarf-enum.py
@@ -2,6 +2,7 @@
import argparse
import re
+import os
HEADER = """\
//===-- SBLanguages.h -----------------------------------------*- C++ -*-===//
@@ -37,6 +38,9 @@ def emit_enum(input, output):
with open(input, "r") as f:
lines = f.readlines()
+ # Create output folder if it does not exist
+ os.makedirs(os.path.dirname(output), exist_ok=True)
+
# Write the output.
with open(output, "w") as f:
# Emit the header.
More information about the lldb-commits
mailing list