When we find a module we want, in an archive, in verbose mode,
[oota-llvm.git] / tools / gccld / gccld.h
1 //===- gccld.h - Utility functions header file ------------------*- C++ -*-===//
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 namespace llvm {
21
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);
50 int
51 GenerateNative (const std::string & OutputFilename,
52                 const std::string & InputFilename,
53                 const std::vector<std::string> & Libraries,
54                 const std::vector<std::string> & LibPaths,
55                 const std::string & gcc,
56                 char ** const envp);
57
58 std::auto_ptr<Module>
59 LoadObject (const std::string & FN, std::string &OutErrorMessage);
60
61 bool
62 LinkLibraries (const char * progname,
63                Module * HeadModule,
64                const std::vector<std::string> & Libraries,
65                const std::vector<std::string> & LibPaths,
66                bool Verbose,
67                bool Native);
68 bool
69 LinkFiles (const char * progname,
70            Module * HeadModule,
71            const std::vector<std::string> & Files,
72            bool Verbose);
73
74 } // End llvm namespace