John Criswell | f430434 | 2003-09-19 20:24:40 +0000 | [diff] [blame^] | 1 | //===- util.h - Utility functions header file -----------------------------===// |
| 2 | // |
| 3 | // This file contains function prototypes for the functions in util.cpp. |
| 4 | // |
| 5 | //===----------------------------------------------------------------------===// |
| 6 | |
| 7 | #include "llvm/Module.h" |
| 8 | |
| 9 | #include <string> |
| 10 | #include <set> |
| 11 | #include <ostream> |
| 12 | |
| 13 | int |
| 14 | PrintAndReturn (const char *progname, |
| 15 | const std::string &Message, |
| 16 | const std::string &Extra = ""); |
| 17 | |
| 18 | void |
| 19 | GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols); |
| 20 | |
| 21 | void |
| 22 | GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols); |
| 23 | |
| 24 | char ** |
| 25 | CopyEnv (char ** const envp); |
| 26 | |
| 27 | void |
| 28 | RemoveEnv (const char * name, char ** const envp); |
| 29 | |
| 30 | int |
| 31 | GenerateBytecode (Module * M, |
| 32 | bool Strip, |
| 33 | bool Internalize, |
| 34 | std::ostream * Out); |
| 35 | |
| 36 | int |
| 37 | GenerateAssembly (const std::string & OutputFilename, |
| 38 | const std::string & InputFilename, |
| 39 | const std::string & llc, |
| 40 | char ** const envp); |
| 41 | int |
| 42 | GenerateNative (const std::string & OutputFilename, |
| 43 | const std::string & InputFilename, |
| 44 | const std::vector<std::string> & Libraries, |
| 45 | const std::vector<std::string> & LibPaths, |
| 46 | const std::string & gcc, |
| 47 | char ** const envp); |
| 48 | |
| 49 | std::auto_ptr<Module> |
| 50 | LoadObject (const std::string & FN, std::string &OutErrorMessage); |
| 51 | |
| 52 | bool |
| 53 | LinkLibraries (const char * progname, |
| 54 | Module * HeadModule, |
| 55 | const std::vector<std::string> & Libraries, |
| 56 | const std::vector<std::string> & LibPaths, |
| 57 | bool Verbose, |
| 58 | bool Native); |
| 59 | bool |
| 60 | LinkFiles (const char * progname, |
| 61 | Module * HeadModule, |
| 62 | const std::vector<std::string> & Files, |
| 63 | bool Verbose); |
| 64 | |