blob: e5b865e3a4fe43e03d77e6f937bac5c223664d97 [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
Brian Gaeked0fde302003-11-11 22:41:34 +000020namespace llvm {
21
John Criswellf4304342003-09-19 20:24:40 +000022int
23PrintAndReturn (const char *progname,
24 const std::string &Message,
25 const std::string &Extra = "");
26
27void
28GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
29
30void
31GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
32
33char **
34CopyEnv (char ** const envp);
35
36void
37RemoveEnv (const char * name, char ** const envp);
38
39int
40GenerateBytecode (Module * M,
41 bool Strip,
42 bool Internalize,
43 std::ostream * Out);
44
45int
46GenerateAssembly (const std::string & OutputFilename,
47 const std::string & InputFilename,
48 const std::string & llc,
49 char ** const envp);
50int
51GenerateNative (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
58std::auto_ptr<Module>
59LoadObject (const std::string & FN, std::string &OutErrorMessage);
60
Misha Brukman84fbc652003-11-20 19:08:06 +000061std::string FindLib(const std::string &Filename,
62 const std::vector<std::string> &Paths,
63 bool SharedObjectOnly = false);
64
Chris Lattner6cc8ca92003-11-28 07:44:09 +000065void LinkLibraries (const char * progname, Module* HeadModule,
66 const std::vector<std::string> & Libraries,
67 const std::vector<std::string> & LibPaths,
68 bool Verbose, bool Native);
John Criswellf4304342003-09-19 20:24:40 +000069bool
70LinkFiles (const char * progname,
71 Module * HeadModule,
72 const std::vector<std::string> & Files,
73 bool Verbose);
74
Brian Gaeked0fde302003-11-11 22:41:34 +000075} // End llvm namespace