mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
[OCaml] Expose Llvm.parse_command_line_options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220847 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -60,6 +60,17 @@ CAMLprim value llvm_enable_pretty_stacktrace(value Unit) {
|
||||
return Val_unit;
|
||||
}
|
||||
|
||||
CAMLprim value llvm_parse_command_line_options(value Overview, value Args) {
|
||||
char *COverview;
|
||||
if (Overview == Val_int(0)) {
|
||||
COverview = NULL;
|
||||
} else {
|
||||
COverview = String_val(Field(Overview, 0));
|
||||
}
|
||||
LLVMParseCommandLineOptions(Wosize_val(Args), (const char* const*) Op_val(Args), COverview);
|
||||
return Val_unit;
|
||||
}
|
||||
|
||||
static value alloc_variant(int tag, void *Value) {
|
||||
value Iter = alloc_small(1, tag);
|
||||
Field(Iter, 0) = Val_op(Value);
|
||||
|
||||
Reference in New Issue
Block a user