1 //===- util.h - Utility functions header file -----------------------------===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
11 // This file contains function prototypes for the functions in util.cpp.
13 //===----------------------------------------------------------------------===//
15 #include "llvm/Module.h"
22 PrintAndReturn (const char *progname,
23 const std::string &Message,
24 const std::string &Extra = "");
27 GetAllDefinedSymbols (Module *M, std::set<std::string> &DefinedSymbols);
30 GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols);
33 CopyEnv (char ** const envp);
36 RemoveEnv (const char * name, char ** const envp);
39 GenerateBytecode (Module * M,
45 GenerateAssembly (const std::string & OutputFilename,
46 const std::string & InputFilename,
47 const std::string & llc,
50 GenerateNative (const std::string & OutputFilename,
51 const std::string & InputFilename,
52 const std::vector<std::string> & Libraries,
53 const std::vector<std::string> & LibPaths,
54 const std::string & gcc,
58 LoadObject (const std::string & FN, std::string &OutErrorMessage);
61 LinkLibraries (const char * progname,
63 const std::vector<std::string> & Libraries,
64 const std::vector<std::string> & LibPaths,
68 LinkFiles (const char * progname,
70 const std::vector<std::string> & Files,