parseIRError | R Documentation |
This is an R-level function for raising an error specifically from parsing an IR file. This is implemented in R and called from C++ code because the messages were calling problems and also because it is easier to raise richer errors, i.e. with classes and extra information.
parseIRError(line, col, msg)
line |
the line number in the file where the error occurred |
col |
the column number in the line where the error occurred |
msg |
the message describing the error as provided by LLVM |
An error object of class ParseIRError
and LLVMError
.
Duncan Temple Lang
parseIR
## Not run:
ir = c("
"declare i8* @foo(
tryCatch(parseIR(paste(ir, collapse = "\n")),
error = function(e) {
print(e$message)
print(e$lineNum)
print(e$colNum)
print(class(e))
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.