Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 14 | pmbaty | 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 | |||
| 19 | namespace llvm { |
||
| 20 | |||
| 21 | class LowerGlobalDtorsPass : public PassInfoMixin<LowerGlobalDtorsPass> { |
||
| 22 | public: |
||
| 23 | PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); |
||
| 24 | }; |
||
| 25 | |||
| 26 | } // namespace llvm |
||
| 27 | |||
| 28 | #endif // LLVM_TRANSFORMS_UTILS_LOWERGLOBALDTORS_H |