LLVM API Documentation

c/IRReader.h
Go to the documentation of this file.
00001 /*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\
00002 |*                                                                            *|
00003 |*                     The LLVM Compiler Infrastructure                       *|
00004 |*                                                                            *|
00005 |* This file is distributed under the University of Illinois Open Source      *|
00006 |* License. See LICENSE.TXT for details.                                      *|
00007 |*                                                                            *|
00008 |*===----------------------------------------------------------------------===*|
00009 |*                                                                            *|
00010 |* This file defines the C interface to the IR Reader.                        *|
00011 |*                                                                            *|
00012 \*===----------------------------------------------------------------------===*/
00013 
00014 #ifndef LLVM_C_IRREADER_H
00015 #define LLVM_C_IRREADER_H
00016 
00017 #include "llvm-c/Core.h"
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 /**
00024  * Read LLVM IR from a memory buffer and convert it into an in-memory Module
00025  * object. Returns 0 on success.
00026  * Optionally returns a human-readable description of any errors that
00027  * occurred during parsing IR. OutMessage must be disposed with
00028  * LLVMDisposeMessage.
00029  *
00030  * @see llvm::ParseIR()
00031  */
00032 LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef,
00033                               LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,
00034                               char **OutMessage);
00035 
00036 #ifdef __cplusplus
00037 }
00038 #endif
00039 
00040 #endif