aboutsummaryrefslogtreecommitdiffhomepage
path: root/ext/llvm-sys.rs/src/ir_reader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/llvm-sys.rs/src/ir_reader.rs')
-rw-r--r--ext/llvm-sys.rs/src/ir_reader.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/llvm-sys.rs/src/ir_reader.rs b/ext/llvm-sys.rs/src/ir_reader.rs
new file mode 100644
index 0000000..e5c9f2b
--- /dev/null
+++ b/ext/llvm-sys.rs/src/ir_reader.rs
@@ -0,0 +1,16 @@
+//! The IR reader
+
+use super::prelude::*;
+
+extern "C" {
+ /// Read LLVM IR from a memory buffer and convert it to an in-memory Module.
+ ///
+ /// Returns 0 on success, and an optional human-readable description of any
+ /// errors that occurred.
+ pub fn LLVMParseIRInContext(
+ ContextRef: LLVMContextRef,
+ MemBuf: LLVMMemoryBufferRef,
+ OutM: *mut LLVMModuleRef,
+ OutMessage: *mut *mut ::libc::c_char,
+ ) -> LLVMBool;
+}