1 //===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Chris Lattner and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header defines interfaces to read and write LLVM bitcode files/streams.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_BITCODE_H
15 #define LLVM_BITCODE_H
24 ModuleProvider *getBitcodeModuleProvider(const std::string &Filename,
25 std::string *ErrMsg = 0);
28 /// ParseBitcodeFile - Read the specified bitcode file, returning the module.
29 /// If an error occurs, return null and fill in *ErrMsg if non-null.
30 Module *ParseBitcodeFile(const std::string &Filename,
31 std::string *ErrMsg = 0);
33 /// WriteBitcodeToFile - Write the specified module to the specified output
35 void WriteBitcodeToFile(const Module *M, std::ostream &Out);
36 } // End llvm namespace