public class LLVMOptRemarks
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LLVMOptRemarks.Functions
Contains the function pointers loaded from
LLVMCore.getLibrary(). |
| Modifier and Type | Field and Description |
|---|---|
static int |
OPT_REMARKS_API_VERSION |
| Modifier and Type | Method and Description |
|---|---|
static long |
LLVMOptRemarkParserCreate(java.nio.ByteBuffer Buf)
Creates a remark parser that can be used to read and parse the buffer located in
Buf of size Size. |
static void |
LLVMOptRemarkParserDispose(long Parser)
Releases all the resources used by
Parser. |
static java.lang.String |
LLVMOptRemarkParserGetErrorMessage(long Parser)
Returns a null-terminated string containing an error message.
|
static LLVMOptRemarkEntry |
LLVMOptRemarkParserGetNext(long Parser)
Returns the next remark in the file.
|
static boolean |
LLVMOptRemarkParserHasError(long Parser)
Returns
1 if the parser encountered an error while parsing the buffer. |
static int |
LLVMOptRemarkVersion()
Returns the version of the opt-remarks dylib.
|
static long |
nLLVMOptRemarkParserCreate(long Buf,
long Size)
Unsafe version of:
OptRemarkParserCreate |
static long |
nLLVMOptRemarkParserGetErrorMessage(long Parser)
Unsafe version of:
OptRemarkParserGetErrorMessage |
static long |
nLLVMOptRemarkParserGetNext(long Parser)
Unsafe version of:
OptRemarkParserGetNext |
public static final int OPT_REMARKS_API_VERSION
public static long nLLVMOptRemarkParserCreate(long Buf,
long Size)
OptRemarkParserCreatepublic static long LLVMOptRemarkParserCreate(java.nio.ByteBuffer Buf)
Buf of size Size.
Buf cannot be NULL.
This function should be paired with OptRemarkParserDispose to avoid leaking resources.
public static long nLLVMOptRemarkParserGetNext(long Parser)
OptRemarkParserGetNext@Nullable public static LLVMOptRemarkEntry LLVMOptRemarkParserGetNext(long Parser)
The value pointed to by the return value is invalidated by the next call to OptRemarkParserGetNext.
If the parser reaches the end of the buffer, the return value will be NULL.
In the case of an error, the return value will be NULL, and:
OptRemarkParserHasError will return 1.OptRemarkParserGetErrorMessage will return a descriptive error message.An error may occur if:
1. It can occur on malformed YAML.Here is a quick example of the usage:
LLVMOptRemarkParserRef Parser = LLVMOptRemarkParserCreate(Buf, Size);
LLVMOptRemarkEntry *Remark = NULL;
while ((Remark == LLVMOptRemarkParserGetNext(Parser))) {
// use Remark
}
bool HasError = LLVMOptRemarkParserHasError(Parser);
LLVMOptRemarkParserDispose(Parser);public static boolean LLVMOptRemarkParserHasError(long Parser)
1 if the parser encountered an error while parsing the buffer.public static long nLLVMOptRemarkParserGetErrorMessage(long Parser)
OptRemarkParserGetErrorMessage@Nullable public static java.lang.String LLVMOptRemarkParserGetErrorMessage(long Parser)
In case of no error, the result is NULL.
The memory of the string is bound to the lifetime of Parser. If OptRemarkParserDispose is called, the memory of the string will be
released.
public static void LLVMOptRemarkParserDispose(long Parser)
Parser.public static int LLVMOptRemarkVersion()
Copyright LWJGL. All Rights Reserved. License terms.