Brian Gaeke | aee4de9 | 2003-11-05 22:13:10 +0000 | [diff] [blame] | 1 | //===- gccld.h - Utility functions header file ------------------*- C++ -*-===// |
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 | //===----------------------------------------------------------------------===// |
John Criswell | f430434 | 2003-09-19 20:24:40 +0000 | [diff] [blame] | 9 | // |
| 10 | // This file contains function prototypes for the functions in util.cpp. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "llvm/Module.h" |
| 15 | |
| 16 | #include <string> |
| 17 | #include <set> |
| 18 | #include <ostream> |
| 19 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 20 | namespace llvm { |
| 21 | |
John Criswell | f430434 | 2003-09-19 20:24:40 +0000 | [diff] [blame] | 22 | int |
| 23 | PrintAndReturn (const char *progname, |
| 24 | const std::string &Message, |
| 25 | const std::string &Extra = ""); |
| 26 | |
| 27 | void |
| 28 | GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols); |
| 29 | |
| 30 | void |
| 31 | GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols); |
| 32 | |
| 33 | char ** |
| 34 | CopyEnv (char ** const envp); |
| 35 | |
| 36 | void |
| 37 | RemoveEnv (const char * name, char ** const envp); |
| 38 | |
| 39 | int |
| 40 | GenerateBytecode (Module * M, |
| 41 | bool Strip, |
| 42 | bool Internalize, |
| 43 | std::ostream * Out); |
| 44 | |
| 45 | int |
| 46 | GenerateAssembly (const std::string & OutputFilename, |
| 47 | const std::string & InputFilename, |
| 48 | const std::string & llc, |
| 49 | char ** const envp); |
Chris Lattner | 69e8d28 | 2004-04-06 16:43:13 +0000 | [diff] [blame^] | 50 | |
| 51 | int GenerateCFile(const std::string &OutputFile, const std::string &InputFile, |
| 52 | const std::string &llc, char ** const envp); |
John Criswell | f430434 | 2003-09-19 20:24:40 +0000 | [diff] [blame] | 53 | int |
| 54 | GenerateNative (const std::string & OutputFilename, |
| 55 | const std::string & InputFilename, |
| 56 | const std::vector<std::string> & Libraries, |
| 57 | const std::vector<std::string> & LibPaths, |
| 58 | const std::string & gcc, |
| 59 | char ** const envp); |
| 60 | |
| 61 | std::auto_ptr<Module> |
| 62 | LoadObject (const std::string & FN, std::string &OutErrorMessage); |
| 63 | |
Misha Brukman | 84fbc65 | 2003-11-20 19:08:06 +0000 | [diff] [blame] | 64 | std::string FindLib(const std::string &Filename, |
| 65 | const std::vector<std::string> &Paths, |
| 66 | bool SharedObjectOnly = false); |
| 67 | |
Chris Lattner | 6cc8ca9 | 2003-11-28 07:44:09 +0000 | [diff] [blame] | 68 | void LinkLibraries (const char * progname, Module* HeadModule, |
| 69 | const std::vector<std::string> & Libraries, |
| 70 | const std::vector<std::string> & LibPaths, |
| 71 | bool Verbose, bool Native); |
John Criswell | f430434 | 2003-09-19 20:24:40 +0000 | [diff] [blame] | 72 | bool |
| 73 | LinkFiles (const char * progname, |
| 74 | Module * HeadModule, |
| 75 | const std::vector<std::string> & Files, |
| 76 | bool Verbose); |
| 77 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 78 | } // End llvm namespace |