ΒΆextern LLVMRemarkEntryRef LLVMRemarkParserGetNext(
    LLVMRemarkParserRef Parser)

Description

Returns the next remark in the file. The value pointed to by the return value needs to be disposed using a call to LLVMRemarkEntryDispose(). All the entries in the returned value that are of LLVMRemarkStringRef type will become invalidated once a call to LLVMRemarkParserDispose is made. 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: 1) LLVMRemarkParserHasError() will return `1`. 2) LLVMRemarkParserGetErrorMessage() will return a descriptive error message. An error may occur if: 1) An argument is invalid. 2) There is a parsing error. This can occur on things like malformed YAML. 3) There is a Remark semantic error. This can occur on well-formed files with missing or extra fields. Here is a quick example of the usage: ``` LLVMRemarkParserRef Parser = LLVMRemarkParserCreateYAML(Buf, Size); LLVMRemarkEntryRef Remark = NULL; while ((Remark = LLVMRemarkParserGetNext(Parser))) { // use Remark LLVMRemarkEntryDispose(Remark); // Release memory. } bool HasError = LLVMRemarkParserHasError(Parser); LLVMRemarkParserDispose(Parser); ```

Declared at: llvm/include/llvm-c/Remarks.h:302

Parameters

LLVMRemarkParserRef Parser