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