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
15namespace llvm {
16class GlobalValue;
17
18class ExtractGVPass : public PassInfoMixin<ExtractGVPass> {
19private:
20 SetVector<GlobalValue *> Named;
21 bool deleteStuff;
22 bool keepConstInit;
23
24public:
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