etc/services - sync with NetBSD-8
[minix.git] / minix / llvm / passes / include / sectionify / SectionifyPass.h
blobd859f74c8de893139240533e5008e1c1ed4bf2e1
1 #ifndef SECTIONIFY_PASS_H
3 #define SECTIONIFY_PASS_H
5 #include <pass.h>
7 using namespace llvm;
9 namespace llvm {
11 class SectionifyPass : public ModulePass {
13 public:
14 static char ID;
16 SectionifyPass();
18 virtual bool runOnModule(Module &M);
20 private:
21 std::map<Regex*, std::string> functionRegexMap;
22 std::vector<Regex*> functionRegexList;
23 std::map<Regex*, std::string> dataRegexMap;
24 std::vector<Regex*> dataRegexList;
25 std::string moduleName;
27 bool sectionifyFromRegex(GlobalObject *value, Regex *regex, std::string &section);
28 bool sectionify(GlobalObject *value, std::vector<Regex*> &regexList, std::map<Regex*, std::string> &regexMap);
29 void parseAndInitRegexMap(cl::list<std::string> &stringListOpt, std::vector<Regex*> &regexList, std::map<Regex*, std::string> &regexMap, std::string regexType);
30 bool initRegexMap(std::map<Regex*, std::string> &regexMap, std::vector<Regex*> &regexList, std::map<std::string, std::string> &stringMap, std::vector<std::string> &stringList, std::string regexType);
31 bool parseStringMapOpt(std::map<std::string, std::string> &map, std::vector<std::string> &keyList, std::vector<std::string> &stringList);
36 #endif