blob: e3c5504209503f016abb883eb32560532764370f [file] [log] [blame]
Brian Gaekeaee4de92003-11-05 22:13:10 +00001//===- gccld.h - Utility functions header file ------------------*- C++ -*-===//
John Criswell7c0e0222003-10-20 17:47:21 +00002//
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 Criswellf4304342003-09-19 20:24:40 +00009//
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
20int
21PrintAndReturn (const char *progname,
22 const std::string &Message,
23 const std::string &Extra = "");
24
25void
26GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
27
28void
29GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
30
31char **
32CopyEnv (char ** const envp);
33
34void
35RemoveEnv (const char * name, char ** const envp);
36
37int
38GenerateBytecode (Module * M,
39 bool Strip,
40 bool Internalize,
41 std::ostream * Out);
42
43int
44GenerateAssembly (const std::string & OutputFilename,
45 const std::string & InputFilename,
46 const std::string & llc,
47 char ** const envp);
48int
49GenerateNative (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
56std::auto_ptr<Module>
57LoadObject (const std::string & FN, std::string &OutErrorMessage);
58
59bool
60LinkLibraries (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);
66bool
67LinkFiles (const char * progname,
68 Module * HeadModule,
69 const std::vector<std::string> & Files,
70 bool Verbose);
71