Remove unneeded #include
[oota-llvm.git] / include / llvm / Bytecode / Reader.h
1 //===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ---*- 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 functionality is implemented by the lib/Bytecode/Reader library.
11 // This library is used to read VM bytecode files from an iostream.
12 //
13 // Note that performance of this library is _crucial_ for performance of the
14 // JIT type applications, so we have designed the bytecode format to support
15 // quick reading.
16 //
17 //===----------------------------------------------------------------------===//
18
19 #ifndef LLVM_BYTECODE_READER_H
20 #define LLVM_BYTECODE_READER_H
21
22 #include "llvm/ModuleProvider.h"
23 #include <string>
24 #include <vector>
25
26 namespace llvm {
27
28 /// getBytecodeModuleProvider - lazy function-at-a-time loading from a file
29 ///
30 ModuleProvider *getBytecodeModuleProvider(const std::string &Filename);
31
32 /// getBytecodeBufferModuleProvider - lazy function-at-a-time loading from a
33 /// buffer
34 ///
35 ModuleProvider *getBytecodeBufferModuleProvider(const unsigned char *Buffer,
36                                                 unsigned BufferSize,
37                                                 const std::string &ModuleID="");
38
39 /// ParseBytecodeFile - Parse the given bytecode file
40 ///
41 Module* ParseBytecodeFile(const std::string &Filename,
42                           std::string *ErrorStr = 0);
43
44 /// ParseBytecodeBuffer - Parse a given bytecode buffer
45 ///
46 Module* ParseBytecodeBuffer(const unsigned char *Buffer,
47                             unsigned BufferSize,
48                             const std::string &ModuleID = "",
49                             std::string *ErrorStr = 0);
50
51 /// ReadArchiveFile - Read bytecode files from the specfied .a file, returning
52 /// true on error, or false on success.
53 ///
54 bool ReadArchiveFile(const std::string &Filename,
55                      std::vector<Module*> &Objects,
56                      std::string *ErrorStr = 0);
57
58 } // End llvm namespace
59
60 #endif