#ifndef FILEPOLICY_H #define FILEPOLICY_H #include namespace filepolicy { struct FilePolicyPass : public llvm::FunctionPass { static char ID; std::unordered_map errors; FilePolicyPass() : FunctionPass(ID) { } virtual bool runOnFunction(llvm::Function &f) override; virtual void print(llvm::raw_ostream &out, const llvm::Module *m) const override; void addNotOpenError(llvm::Instruction *i, unsigned argNo); }; } #endif