[clang] [CIR] Add support for normal cleanups (PR #149948)

Henrich Lauko via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 23 10:47:18 PDT 2025


================
@@ -0,0 +1,71 @@
+//===--- CIRGenCleanup.cpp - Bookkeeping and code emission for cleanups ---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains code dealing with the IR generation for cleanups
+// and related information.
+//
+// A "cleanup" is a piece of code which needs to be executed whenever
+// control transfers out of a particular scope.  This can be
+// conditionalized to occur only on exceptional control flow, only on
+// normal control flow, or both.
+//
+//===----------------------------------------------------------------------===//
+
+#include "CIRGenFunction.h"
+
+#include "clang/CIR/MissingFeatures.h"
+
+using namespace clang;
+using namespace clang::CIRGen;
+using namespace cir;
----------------
xlauko wrote:

Do we want to have this here anymore? I thought we want to upstream with `cir` namespace explicitly.

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


More information about the cfe-commits mailing list