Lines Matching refs:M
37 llvm::Module* M = llvm::ParseBitcodeFile(MB.get(), Ctx, &ErrMsg); in getModuleFromFilename() local
38 assert(M && ErrMsg); in getModuleFromFilename()
39 return M; in getModuleFromFilename()
42 static void optimizeModule(llvm::Module* M) { in optimizeModule() argument
45 const std::string &ModuleDataLayout = M->getDataLayout(); in optimizeModule()
60 Passes.run(*M); in optimizeModule()
66 llvm::Module* M = getModuleFromFilename(Inputs[0], Ctx, ErrMsg); in linkFilesToModule() local
67 llvm::Linker Linker("llvm-ndk-link", M); in linkFilesToModule()
70 llvm::Module* M = getModuleFromFilename(Inputs[i], Ctx, ErrMsg); in linkFilesToModule() local
71 if (!Linker.LinkInModule(M, &ErrMsg)) { in linkFilesToModule()
74 optimizeModule(M); in linkFilesToModule()
76 M = Linker.releaseModule(); in linkFilesToModule()
79 const std::string &ModuleDataLayout = M->getDataLayout(); in linkFilesToModule()
108 PM.run(*M); in linkFilesToModule()
109 return M; in linkFilesToModule()
124 llvm::OwningPtr<llvm::Module> M(getModuleFromFilename(InputFilenames[0], in main() local
127 llvm::WriteBitcodeToFile(M.get(), FOS); in main()
131 llvm::OwningPtr<llvm::Module> M(linkFilesToModule(InputFilenames, Ctx)); in main() local
132 llvm::WriteBitcodeToFile(M.get(), FOS); in main()