xref: /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/ExtractGV.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- ExtractGV.h -------------------------------------------------------===//
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 #ifndef LLVM_TRANSFORMS_IPO_EXTRACTGV_H
10 #define LLVM_TRANSFORMS_IPO_EXTRACTGV_H
11 
12 #include "llvm/ADT/SetVector.h"
13 #include "llvm/IR/PassManager.h"
14 
15 namespace llvm {
16 class GlobalValue;
17 
18 class ExtractGVPass : public PassInfoMixin<ExtractGVPass> {
19 private:
20   SetVector<GlobalValue *> Named;
21   bool deleteStuff;
22   bool keepConstInit;
23 
24 public:
25   ExtractGVPass(std::vector<GlobalValue *> &GVs, bool deleteS = true,
26                 bool keepConstInit = false);
27   PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
28 };
29 } // namespace llvm
30 
31 #endif // LLVM_TRANSFORMS_IPO_EXTRACTGV_H
32