Merged in RELEASE_1.
[oota-llvm.git] / tools / gccld / gccld.h
1 //===- gccld.h - Utility functions header file ----------------------------===//
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 //
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
20 int
21 PrintAndReturn (const char *progname,
22                 const std::string &Message,
23                 const std::string &Extra = "");
24
25 void
26 GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
27
28 void
29 GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
30
31 char **
32 CopyEnv (char ** const envp);
33
34 void
35 RemoveEnv (const char * name, char ** const envp);
36
37 int
38 GenerateBytecode (Module * M,
39                   bool Strip,
40                   bool Internalize,
41                   std::ostream * Out);
42
43 int
44 GenerateAssembly (const std::string & OutputFilename,
45                   const std::string & InputFilename,
46                   const std::string & llc,
47                   char ** const envp);
48 int
49 GenerateNative (const std::string & OutputFilename,
50                 const std::string & InputFilename,
51                 const std::vector<std::string> & Libraries,
52                 const std::vector<std::string> & LibPaths,
53                 const std::string & gcc,
54                 char ** const envp);
55
56 std::auto_ptr<Module>
57 LoadObject (const std::string & FN, std::string &OutErrorMessage);
58
59 bool
60 LinkLibraries (const char * progname,
61                Module * HeadModule,
62                const std::vector<std::string> & Libraries,
63                const std::vector<std::string> & LibPaths,
64                bool Verbose,
65                bool Native);
66 bool
67 LinkFiles (const char * progname,
68            Module * HeadModule,
69            const std::vector<std::string> & Files,
70            bool Verbose);
71