1//===- LowerGlobalDtors.h - Lower @llvm.global_dtors ----------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This pass lowers @llvm.global_dtors by creating wrapper functions that are
10// registered in @llvm.global_ctors and which contain a call to `__cxa_atexit`
11// to register their destructor functions.
12//
13//===----------------------------------------------------------------------===//
14#ifndef LLVM_TRANSFORMS_UTILS_LOWERGLOBALDTORS_H
15#define LLVM_TRANSFORMS_UTILS_LOWERGLOBALDTORS_H
16
17#include "llvm/IR/PassManager.h"
18
19namespace llvm {
20
21class LowerGlobalDtorsPass : public PassInfoMixin<LowerGlobalDtorsPass> {
22public:
23 PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
24};
25
26} // namespace llvm
27
28#endif // LLVM_TRANSFORMS_UTILS_LOWERGLOBALDTORS_H
29

source code of llvm/include/llvm/Transforms/Utils/LowerGlobalDtors.h