blob: 7f62bad542a077ba90066c0c35acc16cfc910546 [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 +000022void
23GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
24
25void
26GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
27
John Criswellf4304342003-09-19 20:24:40 +000028int
29GenerateBytecode (Module * M,
30 bool Strip,
31 bool Internalize,
32 std::ostream * Out);
33
34int
35GenerateAssembly (const std::string & OutputFilename,
36 const std::string & InputFilename,
37 const std::string & llc,
38 char ** const envp);
Chris Lattner69e8d282004-04-06 16:43:13 +000039
40int GenerateCFile(const std::string &OutputFile, const std::string &InputFile,
41 const std::string &llc, char ** const envp);
John Criswellf4304342003-09-19 20:24:40 +000042int
43GenerateNative (const std::string & OutputFilename,
44 const std::string & InputFilename,
45 const std::vector<std::string> & Libraries,
46 const std::vector<std::string> & LibPaths,
47 const std::string & gcc,
48 char ** const envp);
49
50std::auto_ptr<Module>
51LoadObject (const std::string & FN, std::string &OutErrorMessage);
52
Misha Brukman84fbc652003-11-20 19:08:06 +000053std::string FindLib(const std::string &Filename,
54 const std::vector<std::string> &Paths,
55 bool SharedObjectOnly = false);
56
Chris Lattner6cc8ca92003-11-28 07:44:09 +000057void LinkLibraries (const char * progname, Module* HeadModule,
58 const std::vector<std::string> & Libraries,
59 const std::vector<std::string> & LibPaths,
60 bool Verbose, bool Native);
John Criswellf4304342003-09-19 20:24:40 +000061bool
62LinkFiles (const char * progname,
63 Module * HeadModule,
64 const std::vector<std::string> & Files,
65 bool Verbose);
66
Brian Gaeked0fde302003-11-11 22:41:34 +000067} // End llvm namespace