[clang] [clang][CIR][docs] Fix a Python 3.8 compatibility issue in PostProcessCIRDocs.py (PR #192255)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 06:07:31 PDT 2026


https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/192255

>From ad4875e4082fcc901592d8761a0bd3e69552663a Mon Sep 17 00:00:00 2001
From: Sirui Mu <msrlancern at gmail.com>
Date: Wed, 15 Apr 2026 20:59:59 +0800
Subject: [PATCH] [CIR][docs] Fix a Python 3.8 compatibility issue in
 PostProcessCIRDocs.py

This patch fixes a compatibility issue with Python 3.8 in the
`PostProcessCIRDocs.py`` script.
---
 clang/docs/CIR/_raw/PostProcessCIRDocs.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/clang/docs/CIR/_raw/PostProcessCIRDocs.py b/clang/docs/CIR/_raw/PostProcessCIRDocs.py
index 3cc2211301fdc..9140c828eda6d 100644
--- a/clang/docs/CIR/_raw/PostProcessCIRDocs.py
+++ b/clang/docs/CIR/_raw/PostProcessCIRDocs.py
@@ -42,7 +42,7 @@
 if len(cir_docs_toctree) > 0:
     with open(INDEX_PATH, encoding="utf-8") as fp:
         index_content = fp.read()
-    index_content += f"""
+    index_content += """
 
 CIR Dialect Reference
 ==========================
@@ -51,7 +51,9 @@
     :numbered:
     :maxdepth: 1
 
-    {"\n    ".join(cir_docs_toctree)}
-"""
+    {}
+""".format(
+        "\n    ".join(cir_docs_toctree)
+    )
     with open(INDEX_OUTPUT_PATH, "w", encoding="utf-8") as fp:
         fp.write(index_content)



More information about the cfe-commits mailing list