Path: blob/main/contrib/llvm-project/llvm/include/llvm-c/IRReader.h
35233 views
/*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\1|* *|2|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|3|* Exceptions. *|4|* See https://llvm.org/LICENSE.txt for license information. *|5|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|6|* *|7|*===----------------------------------------------------------------------===*|8|* *|9|* This file defines the C interface to the IR Reader. *|10|* *|11\*===----------------------------------------------------------------------===*/1213#ifndef LLVM_C_IRREADER_H14#define LLVM_C_IRREADER_H1516#include "llvm-c/ExternC.h"17#include "llvm-c/Types.h"1819LLVM_C_EXTERN_C_BEGIN2021/**22* @defgroup LLVMCCoreIRReader IR Reader23* @ingroup LLVMCCore24*25* @{26*/2728/**29* Read LLVM IR from a memory buffer and convert it into an in-memory Module30* object. Returns 0 on success.31* Optionally returns a human-readable description of any errors that32* occurred during parsing IR. OutMessage must be disposed with33* LLVMDisposeMessage.34*35* @see llvm::ParseIR()36*/37LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef,38LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM,39char **OutMessage);4041/**42* @}43*/4445LLVM_C_EXTERN_C_END4647#endif484950