aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Bitcode/ReaderWriter.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-22 06:22:05 +0000
committerChris Lattner <sabre@nondot.org>2007-04-22 06:22:05 +0000
commitb35ca9db9ce25e6b61aa3eaee41464f647d34899 (patch)
treef7fa51149c7ee469f4be9c0e3dbcc378525fd1a8 /include/llvm/Bitcode/ReaderWriter.h
parent749456dee45fe65ebb57a60e7e2099097a2bff23 (diff)
Define the content-independent interfaces to read/write bitcode files and
the high-level interface to read/write LLVM IR bitcode files. This is a work in progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Bitcode/ReaderWriter.h')
-rw-r--r--include/llvm/Bitcode/ReaderWriter.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/llvm/Bitcode/ReaderWriter.h b/include/llvm/Bitcode/ReaderWriter.h
new file mode 100644
index 0000000000..0522f1bb28
--- /dev/null
+++ b/include/llvm/Bitcode/ReaderWriter.h
@@ -0,0 +1,38 @@
+//===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file was developed by Chris Lattner and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This header defines interfaces to read and write LLVM bitcode files/streams.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_BITCODE_H
+#define LLVM_BITCODE_H
+
+#include <iosfwd>
+#include <string>
+
+namespace llvm {
+ class Module;
+ class ModuleProvider;
+
+ ModuleProvider *getBitcodeModuleProvider(const std::string &Filename,
+ std::string *ErrMsg = 0);
+
+
+ /// ParseBitcodeFile - Read the specified bitcode file, returning the module.
+ /// If an error occurs, return null and fill in *ErrMsg if non-null.
+ Module *ParseBitcodeFile(const std::string &Filename,
+ std::string *ErrMsg = 0);
+
+ /// WriteBitcodeToFile - Write the specified module to the specified output
+ /// stream.
+ void WriteBitcodeToFile(const Module *M, std::ostream &Out);
+} // End llvm namespace
+
+#endif