1 //===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=//
3 // This functionality is implemented by the lib/Bytecode/Reader library.
4 // This library is used to read VM bytecode files from an iostream.
6 // Note that performance of this library is _crucial_ for performance of the
7 // JIT type applications, so we have designed the bytecode format to support
10 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_BYTECODE_READER_H
13 #define LLVM_BYTECODE_READER_H
20 // Parse and return a class...
22 Module *ParseBytecodeFile(const std::string &Filename,
23 std::string *ErrorStr = 0);
24 Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned BufferSize,
25 std::string *ErrorStr = 0);
27 // ReadArchiveFile - Read bytecode files from the specfied .a file, returning
28 // true on error, or false on success.
30 bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects,
31 std::string *ErrorStr = 0);