#ifndef LLVM_ANALYSIS_POINTERBINDING_H
#define LLVM_ANALYSIS_POINTERBINDING_H


#include "llvm/IR/PassManager.h"
#include <set>
#include <map>

namespace llvm {
  class Value;
namespace aocc {

class PointerBindingAnalysis :public AnalysisInfoMixin<PointerBindingAnalysis> {
  friend AnalysisInfoMixin<PointerBindingAnalysis>;
  static AnalysisKey Key;
public:
  using Result = std::map<Value *, std::set<Value *>>;
  Result run(Module&, ModuleAnalysisManager& );
};

class PointerBindingPrinterPass :public PassInfoMixin<PointerBindingPrinterPass> {
  raw_ostream& os;
public:
  explicit PointerBindingPrinterPass(raw_ostream& os);
  PreservedAnalyses run(Module& M, ModuleAnalysisManager &AM);
};

}
}

#endif
