[Lldb-commits] [lldb] lldb create API folder if it does not exist, before creating SBLangua… (PR #91128)
Nicklas Boman via lldb-commits
lldb-commits at lists.llvm.org
Mon May 6 11:59:19 PDT 2024
https://github.com/smurfd updated https://github.com/llvm/llvm-project/pull/91128
>From 9a90c71f6fa086cdaf3400bdc5142835a12239bd Mon Sep 17 00:00:00 2001
From: Nicklas Boman <smurfd at gmail.com>
Date: Sun, 5 May 2024 17:40:51 +0200
Subject: [PATCH] lldb create API folder if it does not exist, before creating
SBLanguages.h
---
lldb/scripts/generate-sbapi-dwarf-enum.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lldb/scripts/generate-sbapi-dwarf-enum.py b/lldb/scripts/generate-sbapi-dwarf-enum.py
index 464eb2afff7d6f..f7a13e5efffef5 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