blob: 85bf933a029ea73741155720450a2ddf3fb42e99 [file] [log] [blame]
Reid Spencer56d4b172004-09-13 01:27:53 +00001//===- llvm-ld.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
20namespace llvm {
21
22void
23GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
24
25void
26GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
27
28int
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);
39
40int GenerateCFile(const std::string &OutputFile, const std::string &InputFile,
41 const std::string &llc, char ** const envp);
42int
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
53std::string FindLib(const std::string &Filename,
54 const std::vector<std::string> &Paths,
55 bool SharedObjectOnly = false);
56
57void 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);
61bool
62LinkFiles (const char * progname,
63 Module * HeadModule,
64 const std::vector<std::string> & Files,
65 bool Verbose);
66
67} // End llvm namespace