diff options
| author | Tom Harley | 2020-01-11 02:53:36 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-01-11 02:53:36 +0000 |
| commit | 1a3dc02a18a9050877288a5867e44d9c47a53542 (patch) | |
| tree | 9e0ace97436d177ab81f79372156e3f8d6a0a451 | |
| parent | Add option to enable/disable boxing (diff) | |
| download | sinter-1a3dc02a18a9050877288a5867e44d9c47a53542.tar.gz sinter-1a3dc02a18a9050877288a5867e44d9c47a53542.zip | |
Added int width specifiers
The width of an int can be specified at the site of its creation. For example, the following function returns an int of width 2 bits and value 1:
[def two_bit_int [] (2 1)]
Ints can still be written the old way; in these cases the compiler looks for a default int bit-width (specified with the -w flag). If a default has not been defined, the compiler throws an error.
| -rw-r--r-- | examples/nq/Makefile | 11 | ||||
| -rw-r--r-- | examples/nq/closures.sin | 4 | ||||
| -rw-r--r-- | examples/nq/glue.c | 9 | ||||
| -rw-r--r-- | examples/nq/list.sin | 6 | ||||
| -rw-r--r-- | examples/nq/nqueens.sin | 8 | ||||
| -rw-r--r-- | examples/nq/run_func.c | 1 | ||||
| -rw-r--r-- | examples/nq/util.sin | 2 | ||||
| -rw-r--r-- | llvm_codegen.c | 235 | ||||
| -rw-r--r-- | llvm_codegen.h | 5 | ||||
| -rw-r--r-- | scope.pp.c | 5831 | ||||
| -rw-r--r-- | sexpr.h | 2 | ||||
| -rw-r--r-- | sinter.c | 20 |
12 files changed, 161 insertions, 5973 deletions
diff --git a/examples/nq/Makefile b/examples/nq/Makefile index 60b2d94..1f8a66b 100644 --- a/examples/nq/Makefile +++ b/examples/nq/Makefile @@ -2,17 +2,20 @@ CC = clang CXX = clang++ SINC = ../../sinter -DEBUG = -g -O3 +DEBUG = -g -O0 CFLAGS = $(DEBUG) -Werror -Wpedantic -Wall -I$(HOME)/usr/include LDFLAGS = $(DEBUG) -L$(HOME)/usr/lib LDLIBS = -lgc LLCFLAGS = $(DEBUG) -Werror -Wpedantic -Wall -SINCFLAGS = -u always +SINCFLAGS = -u never -w 32 TRGT = nqueens +SINS = $(wildcard *.sin) +LLEXT = $(SINS:.sin=.ll) + include ../../common.mak .PHONY: default all clean @@ -21,7 +24,7 @@ default: all all: $(TRGT) -$(TRGT): nqueens.o util.o either.o list.o closures.o run_func.o glue.o +$(TRGT): nqueens.o util.o either.o list.o closures.o run_func.o glue.o gglue.o clean: - $(RM) *.ll *.dot *.svg *.o $(TRGT) + $(RM) $(LLEXT) *.dot *.svg *.o $(TRGT) diff --git a/examples/nq/closures.sin b/examples/nq/closures.sin index 2e23daf..36d5427 100644 --- a/examples/nq/closures.sin +++ b/examples/nq/closures.sin @@ -16,10 +16,12 @@ [dec tail [xs]] [dec is_nil [xs]] +[dec inc [x]] + [def add_arg [c a] [closure_ [closure_.func c] [closure_.arity c] - [+ [closure_.arg_c c] 1] + [inc [closure_.arg_c c]] [append [closure_.args c] a]]] [def run_closure [h] diff --git a/examples/nq/glue.c b/examples/nq/glue.c index 07dfae7..a1ef772 100644 --- a/examples/nq/glue.c +++ b/examples/nq/glue.c @@ -1,12 +1,13 @@ #include <stdio.h> #include <stdlib.h> #include <assert.h> +#include <stdint.h> #include <gc.h> -void *count_solns(void *n); +int count_solns(int n); -void *gc_alloc(int size) { +void *gc_alloc(size_t size) { void *p = GC_MALLOC(size); /* @@ -34,8 +35,8 @@ int main(int argc, char **argv) { printf("usage: %s n\n", argv[0]); } else { - uintptr_t n = atoi(argv[1]); - int n_solns = (int) count_solns((void *) n); + int n = atoi(argv[1]); + int n_solns = count_solns(n); printf("%i solutions found\n", n_solns); } diff --git a/examples/nq/list.sin b/examples/nq/list.sin index 87c2509..2023a95 100644 --- a/examples/nq/list.sin +++ b/examples/nq/list.sin @@ -2,9 +2,13 @@ [type nil_ [kind]] [dec = [x y]] +[dec + [x y]] +[dec - [x y]] [dec !> [c a]] +[dec inc [x]] + [def cons [head tail] [list_ 0 head tail]] @@ -28,7 +32,7 @@ [def _length [xs n] [if [is_nil xs] n - [_length [tail xs] [+ n 1]]]] + [_length [tail xs] [inc n]]]] [def length [xs] [_length xs 0]] diff --git a/examples/nq/nqueens.sin b/examples/nq/nqueens.sin index 6839dc0..35777fd 100644 --- a/examples/nq/nqueens.sin +++ b/examples/nq/nqueens.sin @@ -23,6 +23,11 @@ [dec !> [c a]] [dec closure [f a]] +[dec count_solns [n]] + +[dec + [x y]] +[dec - [x y]] + [def safe [x d qs] [if [is_nil qs] 1 @@ -78,6 +83,3 @@ [!>>= [gen [- n 1] nq] [!> [closure gen_1 2] nq]] [cons [nil] [nil]]]] - -[def count_solns [n] - [length [gen n n]]] diff --git a/examples/nq/run_func.c b/examples/nq/run_func.c index 1442ecb..efb3bde 100644 --- a/examples/nq/run_func.c +++ b/examples/nq/run_func.c @@ -75,5 +75,6 @@ void *run_func(void *f, void *v, void *as) { void *inter_assert(void *a, void *b) { assert(a); + /* assert(*((int *) a)); */ return b; } diff --git a/examples/nq/util.sin b/examples/nq/util.sin index 20cf3c4..13e310e 100644 --- a/examples/nq/util.sin +++ b/examples/nq/util.sin @@ -8,6 +8,8 @@ y 0]] +[dec - [x y]] + [def != [x y] [- x y]] diff --git a/llvm_codegen.c b/llvm_codegen.c index 43a2ad1..1e6ce93 100644 --- a/llvm_codegen.c +++ b/llvm_codegen.c @@ -29,13 +29,14 @@ static LLVMContextRef global_context; static LLVMBasicBlockRef builder_block; +static uint default_bit_width; + static LLVMTypeRef gc_alloc_t; static LLVMValueRef gc_alloc_p; static LLVMTypeRef print_int_t; static LLVMValueRef print_int_p; -static LLVMTypeRef llvm_int_t; static LLVMTypeRef llvm_str_t; static LLVMTypeRef boxed_t; @@ -68,9 +69,9 @@ LLVMValueRef build_call(LLVMBuilderRef b, LLVMTypeRef t, LLVMValueRef p, LLVMValueRef smart_box_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef val, LLVMTypeRef type) { - LLVMValueRef size = LLVMConstIntCast(LLVMSizeOf(type), llvm_int_t, 0); + LLVMValueRef size = LLVMSizeOf(type); LLVMTypeRef ptr_t = LLVMPointerType(type, 0); - LLVMValueRef ptr_size = LLVMConstIntCast(LLVMSizeOf(ptr_t), llvm_int_t, 0); + LLVMValueRef ptr_size = LLVMSizeOf(ptr_t); LLVMBasicBlockRef cond_b = LLVMAppendBasicBlock(f, "box_cond"); LLVMBasicBlockRef smol_b = LLVMAppendBasicBlock(f, "box_smol"); @@ -89,6 +90,8 @@ LLVMValueRef smart_box_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef val, put_builder_at_end(b, beeg_b); LLVMValueRef box = build_call(b, gc_alloc_t, gc_alloc_p, &size, 1, "boxed"); + LLVMValueRef box_cast = LLVMBuildPointerCast(b, box, ptr_t, "box_uncast"); + LLVMBuildStore(b, val, box_cast); LLVMBuildBr(b, done_b); put_builder_at_end(b, done_b); @@ -103,14 +106,20 @@ LLVMValueRef smart_box_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef val, LLVMValueRef box_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef val, LLVMTypeRef type) { - LLVMValueRef size = LLVMConstIntCast(LLVMSizeOf(type), llvm_int_t, 0); + LLVMValueRef size = LLVMSizeOf(type); + LLVMTypeRef ptr_t = LLVMPointerType(type, 0); switch (boxing_rule) { - case ALWAYS_BOX: - return build_call(b, gc_alloc_t, gc_alloc_p, &size, 1, "boxed"); + case ALWAYS_BOX: { + LLVMValueRef box = build_call(b, gc_alloc_t, gc_alloc_p, &size, 1, + "boxed"); + LLVMValueRef cast = LLVMBuildPointerCast(b, box, ptr_t, + "box_uncast"); + LLVMBuildStore(b, val, cast); + return box; - case NEVER_BOX: + } case NEVER_BOX: return LLVMBuildCast(b, LLVMIntToPtr, val, boxed_t, "cast"); case SMART_BOX: @@ -119,13 +128,17 @@ LLVMValueRef box_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef val, } } +LLVMValueRef build_gc_alloc(LLVMBuilderRef b, LLVMTypeRef t, char *id) { + LLVMValueRef size = LLVMSizeOf(t); + return LLVMBuildCall2(b, gc_alloc_t, gc_alloc_p, &size, 1, id); +} + LLVMValueRef smart_unbox_val(LLVMValueRef f, LLVMBuilderRef b, LLVMValueRef box, LLVMTypeRef type) { - LLVMValueRef size = LLVMConstIntCast(LLVMSizeOf(type), llvm_int_t, 0); + LLVMValueRef size = LLVMSizeOf(type); LLVMTypeRef ptr_type = LLVMPointerType(type, 0); - LLVMValueRef ptr_size = LLVMConstIntCast(LLVMSizeOf(ptr_type), llvm_int_t, - 0); + LLVMValueRef ptr_size = LLVMSizeOf(ptr_type); LLVMBasicBlockRef cond_b = LLVMAppendBasicBlock(f, "box_cond"); LLVMBasicBlockRef smol_b = LLVMAppendBasicBlock(f, "box_smol"); @@ -183,13 +196,29 @@ LLVMValueRef codegen_print_int(LLVMValueRef ref) { return ret; } -LLVMValueRef codegen_int(LLVMValueRef f, LLVMBuilderRef b, sexpr *sexpr) { - LLVMValueRef val = - LLVMConstInt(llvm_int_t, (unsigned) sexpr->contents.i, 0); - LLVMValueRef box = box_val(f, b, val, llvm_int_t); +LLVMValueRef codegen_default_int(LLVMValueRef f, LLVMBuilderRef b, uint i) { + if (!default_bit_width) error(GENERAL_ERROR, "no bitwidth specified"); + + LLVMTypeRef int_t = LLVMIntType(default_bit_width); + LLVMValueRef val = LLVMConstInt(int_t, i, 0); + LLVMValueRef box = box_val(f, b, val, int_t); return box; } +LLVMValueRef codegen_int(LLVMValueRef f, LLVMBuilderRef b, sexpr *se) { + + uint bit_width = se->contents.n.l->contents.i; + + /* + * could use strtoull to support huge constants + */ + unsigned long long value = se->contents.n.r->contents.i; + + LLVMTypeRef int_t = LLVMIntType(bit_width); + LLVMValueRef val = LLVMConstInt(int_t, value, 0); + return box_val(f, b, val, int_t); +} + LLVMValueRef codegen_id(char *id) { scope_entry *entry = scope_find(sc, id); if (!entry) return 0; @@ -270,35 +299,6 @@ uint get_args_from_list_except_last(sexpr *se, LLVMValueRef *args) { return 1 + get_args_from_list_except_last(se->contents.n.r, args + 1); } -int get_type_param(sexpr *param, char **id, LLVMTypeRef *type) { - assert(param); - assert(param->type == BRANCH); - - sexpr *type_se = param->contents.n.l; - sexpr *id_se = param->contents.n.r; - - *id = id_se->contents.s; - - char *type_str = type_se->contents.s; - if (!strcmp(type_str, "INT")) { - *type = llvm_int_t; - } else if (!strcmp(type_str, "STR")) { - *type = llvm_str_t; - } else { - - /* - * FIXME - * For now, if we don't recognise the type identifier, we assume it's a - * user-defined type (aka a boxed value) - */ - *type = boxed_t; - } - - debug("type element %s with type %s\n", *id, type_str); - - return 0; -} - uint make_type_params(sexpr *params, char **ids) { if (!params) return 0; @@ -334,11 +334,6 @@ int make_trmc_inner_name(char *buf, int n, char *outer_id, char *mod) { return snprintf(buf, n, ".%s.inner.%s", outer_id, mod); } -LLVMValueRef build_gc_alloc(LLVMBuilderRef b, LLVMTypeRef t, char *id) { - LLVMValueRef size = LLVMConstIntCast(LLVMSizeOf(t), llvm_int_t, 0); - return LLVMBuildCall2(b, gc_alloc_t, gc_alloc_p, &size, 1, id); -} - LLVMValueRef codegen_type_definition(sexpr *se) { assert(se); assert(se->type == BRANCH); @@ -417,7 +412,7 @@ LLVMValueRef codegen_type_definition(sexpr *se) { LLVMBasicBlockRef ctor_b = LLVMAppendBasicBlock(ctor_p, "entry"); put_builder_at_end(util_b, ctor_b); - LLVMValueRef src = build_gc_alloc(util_b, struct_t, "src"); + LLVMValueRef src = build_gc_alloc(util_b, struct_t, struct_id); assert(src); LLVMValueRef *args = malloc(filler_param_c * sizeof(*args)); @@ -580,6 +575,7 @@ typedef enum { int is_tail_recursive_branch(char *id, sexpr *branch) { if (branch->type != BRANCH) return 0; + if (branch->contents.n.l->type == INT) return 0; char *outermost_id = branch->contents.n.l->contents.s; scope_entry *outermost_e = scope_find(sc, outermost_id); @@ -594,19 +590,29 @@ int is_tail_recursive_branch(char *id, sexpr *branch) { tail_recursive_t is_tail_recursive(char *id, sexpr *ast) { switch (ast->type) { - case ID: + case INT: + case ID: /* * just an ID here means that the function is returning a constant * function pointer * - * an int here means the function is returning a constant. + * an int here means the function is returning a constant */ debug("%s is not tail recursive because it returns a literal\n", id); return NOT_TAIL_RECURSIVE; case BRANCH: { + if (ast->contents.n.l->type == INT) { + /* + * an int here means the function is returning a constant + */ + debug("%s is not tail recursive because it returns a literal\n", + id); + return NOT_TAIL_RECURSIVE; + } + char *outermost_id = ast->contents.n.l->contents.s; if (!strcmp(id, outermost_id)) { @@ -705,7 +711,7 @@ LLVMValueRef codegen_from_scope(char *func_id, LLVMValueRef *args, uint arg_c, return res; } -void codegen_tmrc_inner(char *outer_id, char **outer_param_ids, LLVMValueRef +void codegen_trmc_inner(char *outer_id, char **outer_param_ids, LLVMValueRef inner_p, LLVMValueRef then_p, LLVMTypeRef then_t, LLVMValueRef else_p, LLVMTypeRef else_t, sexpr *body, sexpr* inner_ast) { @@ -720,6 +726,18 @@ void codegen_tmrc_inner(char *outer_id, char **outer_param_ids, LLVMValueRef sexpr *cond_node = body->contents.n.r; sexpr *cond_ast = cond_node->contents.n.l; + sexpr *then_node = cond_node->contents.n.r; + sexpr *then_ast = then_node->contents.n.l; + + sexpr *else_node = then_node->contents.n.r; + sexpr *else_ast = else_node->contents.n.l; + + uint bit_width = default_bit_width; + sexpr *bit_width_node = else_node->contents.n.r; + if (bit_width_node) bit_width = bit_width_node->contents.n.l->contents.i; + if (!bit_width) error(GENERAL_ERROR, "no bitwidth specified"); + LLVMTypeRef int_t = LLVMIntType(bit_width); + /* FIXME: magic size */ LLVMValueRef next_args[50]; uint outer_arg_c = @@ -738,18 +756,16 @@ void codegen_tmrc_inner(char *outer_id, char **outer_param_ids, LLVMValueRef scope_add_entry(sc, outer_param_ids[i], next_args[i], boxed_t); } - LLVMValueRef zero_v = LLVMConstInt(llvm_int_t, 0, 0); - LLVMValueRef cond_res = unbox_val(inner_p, builder, _codegen(cond_ast, 0), - llvm_int_t); - LLVMValueRef cond_v = LLVMBuildICmp(builder, LLVMIntNE, - cond_res, zero_v, "neq_0"); + LLVMValueRef cond_contents = _codegen(cond_ast, 0); + LLVMValueRef cond_res = unbox_val(inner_p, builder, cond_contents, int_t); + LLVMValueRef zero_v = LLVMConstInt(int_t, 0, 0); + LLVMValueRef cond_v = LLVMBuildICmp(builder, LLVMIntNE, cond_res, zero_v, + "neq_0"); LLVMBuildCondBr(builder, cond_v, then_b, else_b); scope_pop_layer(&sc); put_builder_at_end(builder, then_b); - sexpr *then_node = cond_node->contents.n.r; - sexpr *then_ast = then_node->contents.n.l; if (is_tail_recursive_branch(outer_id, then_ast)) { scope_entry *cons_e = scope_find(sc, @@ -812,8 +828,6 @@ void codegen_tmrc_inner(char *outer_id, char **outer_param_ids, LLVMValueRef } put_builder_at_end(builder, else_b); - sexpr *else_node = then_node->contents.n.r; - sexpr *else_ast = else_node->contents.n.l; if (is_tail_recursive_branch(outer_id, else_ast)) { scope_entry *cons_e = scope_find(sc, @@ -1063,12 +1077,25 @@ void codegen_trmc(scope_entry *outer_e, uint outer_param_c, sexpr *body, sexpr *cond_node = body->contents.n.r; sexpr *cond_ast = cond_node->contents.n.l; - LLVMValueRef llvm_zero_v = LLVMConstInt(llvm_int_t, 0, 0); + + sexpr *then_node = cond_node->contents.n.r; + sexpr *then_ast = then_node->contents.n.l; + + sexpr *else_node = then_node->contents.n.r; + sexpr *else_ast = else_node->contents.n.l; + + uint bit_width = default_bit_width; + sexpr *bit_width_node = else_node->contents.n.r; + if (bit_width_node) bit_width = bit_width_node->contents.n.l->contents.i; + if (!bit_width) error(GENERAL_ERROR, "no bitwidth specified"); + LLVMTypeRef int_t = LLVMIntType(bit_width); + + LLVMValueRef zero_v = LLVMConstInt(int_t, 0, 0); LLVMValueRef cond_res = _codegen(cond_ast, 0); LLVMValueRef unboxed_cond_res = unbox_val(function, builder, cond_res, - llvm_int_t); + int_t); LLVMValueRef cond_v = LLVMBuildICmp(builder, LLVMIntNE, unboxed_cond_res, - llvm_zero_v, "neq_0"); + zero_v, "neq_0"); LLVMBuildCondBr(builder, cond_v, then_b, else_b); uint inner_param_c = outer_param_c + 1; @@ -1076,8 +1103,6 @@ void codegen_trmc(scope_entry *outer_e, uint outer_param_c, sexpr *body, LLVMGetParams(outer_p, params); put_builder_at_end(builder, then_b); - sexpr *then_node = cond_node->contents.n.r; - sexpr *then_ast = then_node->contents.n.l; if (is_tail_recursive_branch(outer_id, then_ast)) { make_trmc_inner_name(inner_id, 50, outer_id, "then"); @@ -1099,8 +1124,6 @@ void codegen_trmc(scope_entry *outer_e, uint outer_param_c, sexpr *body, } put_builder_at_end(builder, else_b); - sexpr *else_node = then_node->contents.n.r; - sexpr *else_ast = else_node->contents.n.l; if (is_tail_recursive_branch(outer_id, else_ast)) { make_trmc_inner_name(inner_id, 50, outer_id, "else"); @@ -1122,11 +1145,11 @@ void codegen_trmc(scope_entry *outer_e, uint outer_param_c, sexpr *body, } function = then_p; - if (then_p) codegen_tmrc_inner(outer_id, param_names, then_p, then_p, + if (then_p) codegen_trmc_inner(outer_id, param_names, then_p, then_p, inner_t, else_p, inner_t, body, then_ast); function = else_p; - if (else_p) codegen_tmrc_inner(outer_id, param_names, else_p, then_p, + if (else_p) codegen_trmc_inner(outer_id, param_names, else_p, then_p, inner_t, else_p, inner_t, body, else_ast); /* @@ -1144,6 +1167,7 @@ void codegen_trmc(scope_entry *outer_e, uint outer_param_c, sexpr *body, scope_entry *find_constructor_base(sexpr *ast) { if (ast->type != BRANCH) return 0; + if (ast->contents.n.l->type != ID) return 0; char *outermost_id = ast->contents.n.l->contents.s; scope_entry *outermost_e = scope_find(sc, outermost_id); @@ -1296,45 +1320,6 @@ LLVMValueRef codegen_definition(sexpr *se) { return func_p; } -/* TODO: maybe make a function? */ -#define codegen_binop(f, b, x, y, op) do { \ - assert(arg_c == 2); \ - LLVMValueRef deref_x = unbox_val(f, b, x, llvm_int_t); \ - LLVMValueRef deref_y = unbox_val(f, b, y, llvm_int_t); \ - LLVMValueRef op_res = op(b, deref_x, deref_y, "op_res"); \ - LLVMValueRef res_box = box_val(f, b, op_res, llvm_int_t); \ - res = res_box; \ -} while (0) - -LLVMValueRef codegen_inbuilt_functions(sexpr *se, uint arg_c, LLVMValueRef - *args_v) { - - assert(se); - - sexpr *l = se->contents.n.l; - /* sexpr *r = se->contents.n.r; */ - - assert(l->type == ID); - - char *func_id = l->contents.s; - - LLVMValueRef res = 0; - - if (!strcmp(func_id, "+")) { - codegen_binop(function, builder, args_v[0], args_v[1], LLVMBuildAdd); - } else if (!strcmp(func_id, "*")) { - codegen_binop(function, builder, args_v[0], args_v[1], LLVMBuildMul); - } else if (!strcmp(func_id, "-")) { - codegen_binop(function, builder, args_v[0], args_v[1], LLVMBuildSub); - } else if (!strcmp(func_id, "/")) { - codegen_binop(function, builder, args_v[0], args_v[1], LLVMBuildSDiv); - } else if (!strcmp(func_id, "%")) { - codegen_binop(function, builder, args_v[0], args_v[1], LLVMBuildSRem); - } - - return res; -} - LLVMValueRef codegen_invocation(sexpr *se, int tail_position) { assert(se); @@ -1353,7 +1338,6 @@ LLVMValueRef codegen_invocation(sexpr *se, int tail_position) { debug_set_builder_location(builder, l); LLVMValueRef res = codegen_from_scope(func_id, args, arg_c, tail_position); - if (!res) res = codegen_inbuilt_functions(se, arg_c, args); if (!res) error(UNKNOWN_ID, "unrecognised ID %s", func_id); @@ -1382,18 +1366,22 @@ LLVMValueRef codegen_conditional(sexpr *se, int tail_position) { sexpr *else_ast = se->contents.n.l; assert(else_ast); - assert(!se->contents.n.r); + uint bit_width = default_bit_width; + se = se->contents.n.r; + if (se) bit_width = se->contents.n.l->contents.i; + if (!bit_width) error(GENERAL_ERROR, "no bitwidth specified"); LLVMBasicBlockRef then_b = LLVMAppendBasicBlock(function, "then"); LLVMBasicBlockRef else_b = LLVMAppendBasicBlock(function, "else"); LLVMBasicBlockRef done_b = LLVMAppendBasicBlock(function, "done"); - LLVMValueRef llvm_zero_v = LLVMConstInt(llvm_int_t, 0, 0); LLVMValueRef cond_res = _codegen(cond_ast, 0); + LLVMTypeRef int_t = LLVMIntType(bit_width); LLVMValueRef unboxed_cond_res = unbox_val(function, builder, cond_res, - llvm_int_t); + int_t); + LLVMValueRef zero = LLVMConstInt(int_t, 0, 0); LLVMValueRef cond_v = LLVMBuildICmp(builder, LLVMIntNE, unboxed_cond_res, - llvm_zero_v, "neq_0"); + zero, "neq_0"); LLVMBuildCondBr(builder, cond_v, then_b, else_b); put_builder_at_end(builder, then_b); @@ -1437,6 +1425,9 @@ LLVMValueRef codegen_branch(sexpr *se, int tail_position) { res = codegen_invocation(se, tail_position); } + } else if (l->type == INT) { + res = codegen_int(function, builder, se); + } else { error(SYNTAX_ERROR, "don't know what to do with above AST"); } @@ -1446,13 +1437,13 @@ LLVMValueRef codegen_branch(sexpr *se, int tail_position) { LLVMValueRef _codegen(sexpr *sexpr, int tail_position) { switch (sexpr->type) { - case NIL: case INT: - return codegen_int(function, builder, sexpr); + return codegen_default_int(function, builder, sexpr->contents.i); case ID: return codegen_id(sexpr->contents.s); case BRANCH: return codegen_branch(sexpr, tail_position); + case NIL: default: printf("erm\n"); return 0; @@ -1509,11 +1500,10 @@ LLVMMetadataRef debug_make_compile_unit(LLVMDIBuilderRef di_builder, profile_debug_info); } -void llvm_codegen_prologue(char *filename, boxing_rule_t br) { +void llvm_codegen_prologue(char *filename, boxing_rule_t br, uint dbw) { sc = 0; scope_push_layer(&sc); - llvm_int_t = LLVMInt32Type(); llvm_str_t = LLVMPointerType(LLVMInt8Type(), 0); boxed_t = LLVMPointerType(LLVMInt8Type(), 0); @@ -1525,6 +1515,7 @@ void llvm_codegen_prologue(char *filename, boxing_rule_t br) { set_module_flag_int(module, "Debug Info Version", 0, 3); boxing_rule = br; + default_bit_width = dbw; LLVMSetTarget(module, target_triple); builder = LLVMCreateBuilder(); @@ -1540,8 +1531,14 @@ void llvm_codegen_prologue(char *filename, boxing_rule_t br) { LLVMDisposeMessage(target_triple); + /* + * Get the size of an arbitrary value to find out what type LLVM uses to + * report sizes. + */ + LLVMTypeRef llvm_size_t = LLVMTypeOf(LLVMSizeOf(LLVMIntType(1))); + /* add gc_alloc */ - LLVMTypeRef gc_alloc_params[] = { llvm_int_t }; + LLVMTypeRef gc_alloc_params[] = { llvm_size_t }; gc_alloc_t = LLVMFunctionType(boxed_t, gc_alloc_params, 1, 0); gc_alloc_p = add_function(gc_alloc_t, "gc_alloc"); diff --git a/llvm_codegen.h b/llvm_codegen.h index 7c97223..70d116d 100644 --- a/llvm_codegen.h +++ b/llvm_codegen.h @@ -9,8 +9,11 @@ typedef enum { SMART_BOX } boxing_rule_t; -void llvm_codegen_prologue(char *filename, boxing_rule_t boxing_rule); +void llvm_codegen_prologue(char *filename, boxing_rule_t boxing_rule, uint + default_bit_width); + void llvm_codegen(sexpr *ast); + int llvm_codegen_epilogue(char *output_filename, format_t format); #endif /* LLVM_CODEGEN_H */ diff --git a/scope.pp.c b/scope.pp.c deleted file mode 100644 index dd3cfba..0000000 --- a/scope.pp.c +++ /dev/null @@ -1,5831 +0,0 @@ -# 1 "scope.c" -# 1 "<built-in>" -# 1 "<command-line>" -# 31 "<command-line>" -# 1 "/usr/include/stdc-predef.h" 1 3 4 -# 32 "<command-line>" 2 -# 1 "scope.c" -# 1 "/usr/include/stdlib.h" 1 3 4 -# 25 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 33 "/usr/include/bits/libc-header-start.h" 3 4 -# 1 "/usr/include/features.h" 1 3 4 -# 450 "/usr/include/features.h" 3 4 -# 1 "/usr/include/sys/cdefs.h" 1 3 4 -# 460 "/usr/include/sys/cdefs.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 461 "/usr/include/sys/cdefs.h" 2 3 4 -# 1 "/usr/include/bits/long-double.h" 1 3 4 -# 462 "/usr/include/sys/cdefs.h" 2 3 4 -# 451 "/usr/include/features.h" 2 3 4 -# 474 "/usr/include/features.h" 3 4 -# 1 "/usr/include/gnu/stubs.h" 1 3 4 -# 10 "/usr/include/gnu/stubs.h" 3 4 -# 1 "/usr/include/gnu/stubs-64.h" 1 3 4 -# 11 "/usr/include/gnu/stubs.h" 2 3 4 -# 475 "/usr/include/features.h" 2 3 4 -# 34 "/usr/include/bits/libc-header-start.h" 2 3 4 -# 26 "/usr/include/stdlib.h" 2 3 4 - - - - - -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 209 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 3 4 - -# 209 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 3 4 -typedef long unsigned int size_t; -# 321 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 3 4 -typedef int wchar_t; -# 32 "/usr/include/stdlib.h" 2 3 4 - - - - - - - -# 1 "/usr/include/bits/waitflags.h" 1 3 4 -# 40 "/usr/include/stdlib.h" 2 3 4 -# 1 "/usr/include/bits/waitstatus.h" 1 3 4 -# 41 "/usr/include/stdlib.h" 2 3 4 -# 55 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/include/bits/floatn.h" 1 3 4 -# 119 "/usr/include/bits/floatn.h" 3 4 -# 1 "/usr/include/bits/floatn-common.h" 1 3 4 -# 24 "/usr/include/bits/floatn-common.h" 3 4 -# 1 "/usr/include/bits/long-double.h" 1 3 4 -# 25 "/usr/include/bits/floatn-common.h" 2 3 4 -# 120 "/usr/include/bits/floatn.h" 2 3 4 -# 56 "/usr/include/stdlib.h" 2 3 4 - - -typedef struct - { - int quot; - int rem; - } div_t; - - - -typedef struct - { - long int quot; - long int rem; - } ldiv_t; - - - - - -__extension__ typedef struct - { - long long int quot; - long long int rem; - } lldiv_t; -# 97 "/usr/include/stdlib.h" 3 4 -extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) ; - - - -extern double atof (const char *__nptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - -extern int atoi (const char *__nptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - -extern long int atol (const char *__nptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - - - -__extension__ extern long long int atoll (const char *__nptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - - - -extern double strtod (const char *__restrict __nptr, - char **__restrict __endptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - -extern float strtof (const char *__restrict __nptr, - char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - -extern long double strtold (const char *__restrict __nptr, - char **__restrict __endptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -# 176 "/usr/include/stdlib.h" 3 4 -extern long int strtol (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - -extern unsigned long int strtoul (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - -__extension__ -extern long long int strtoq (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - -__extension__ -extern unsigned long long int strtouq (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - -__extension__ -extern long long int strtoll (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - -__extension__ -extern unsigned long long int strtoull (const char *__restrict __nptr, - char **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -# 385 "/usr/include/stdlib.h" 3 4 -extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) ; - - -extern long int a64l (const char *__s) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; - - - - -# 1 "/usr/include/sys/types.h" 1 3 4 -# 27 "/usr/include/sys/types.h" 3 4 - - -# 1 "/usr/include/bits/types.h" 1 3 4 -# 27 "/usr/include/bits/types.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 28 "/usr/include/bits/types.h" 2 3 4 -# 1 "/usr/include/bits/timesize.h" 1 3 4 -# 29 "/usr/include/bits/types.h" 2 3 4 - - -typedef unsigned char __u_char; -typedef unsigned short int __u_short; -typedef unsigned int __u_int; -typedef unsigned long int __u_long; - - -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef signed short int __int16_t; -typedef unsigned short int __uint16_t; -typedef signed int __int32_t; -typedef unsigned int __uint32_t; - -typedef signed long int __int64_t; -typedef unsigned long int __uint64_t; - - - - - - -typedef __int8_t __int_least8_t; -typedef __uint8_t __uint_least8_t; -typedef __int16_t __int_least16_t; -typedef __uint16_t __uint_least16_t; -typedef __int32_t __int_least32_t; -typedef __uint32_t __uint_least32_t; -typedef __int64_t __int_least64_t; -typedef __uint64_t __uint_least64_t; - - - -typedef long int __quad_t; -typedef unsigned long int __u_quad_t; - - - - - - - -typedef long int __intmax_t; -typedef unsigned long int __uintmax_t; -# 141 "/usr/include/bits/types.h" 3 4 -# 1 "/usr/include/bits/typesizes.h" 1 3 4 -# 142 "/usr/include/bits/types.h" 2 3 4 -# 1 "/usr/include/bits/time64.h" 1 3 4 -# 143 "/usr/include/bits/types.h" 2 3 4 - - -typedef unsigned long int __dev_t; -typedef unsigned int __uid_t; -typedef unsigned int __gid_t; -typedef unsigned long int __ino_t; -typedef unsigned long int __ino64_t; -typedef unsigned int __mode_t; -typedef unsigned long int __nlink_t; -typedef long int __off_t; -typedef long int __off64_t; -typedef int __pid_t; -typedef struct { int __val[2]; } __fsid_t; -typedef long int __clock_t; -typedef unsigned long int __rlim_t; -typedef unsigned long int __rlim64_t; -typedef unsigned int __id_t; -typedef long int __time_t; -typedef unsigned int __useconds_t; -typedef long int __suseconds_t; - -typedef int __daddr_t; -typedef int __key_t; - - -typedef int __clockid_t; - - -typedef void * __timer_t; - - -typedef long int __blksize_t; - - - - -typedef long int __blkcnt_t; -typedef long int __blkcnt64_t; - - -typedef unsigned long int __fsblkcnt_t; -typedef unsigned long int __fsblkcnt64_t; - - -typedef unsigned long int __fsfilcnt_t; -typedef unsigned long int __fsfilcnt64_t; - - -typedef long int __fsword_t; - -typedef long int __ssize_t; - - -typedef long int __syscall_slong_t; - -typedef unsigned long int __syscall_ulong_t; - - - -typedef __off64_t __loff_t; -typedef char *__caddr_t; - - -typedef long int __intptr_t; - - -typedef unsigned int __socklen_t; - - - - -typedef int __sig_atomic_t; -# 30 "/usr/include/sys/types.h" 2 3 4 - - - -typedef __u_char u_char; -typedef __u_short u_short; -typedef __u_int u_int; -typedef __u_long u_long; -typedef __quad_t quad_t; -typedef __u_quad_t u_quad_t; -typedef __fsid_t fsid_t; - - -typedef __loff_t loff_t; - - - - -typedef __ino_t ino_t; -# 59 "/usr/include/sys/types.h" 3 4 -typedef __dev_t dev_t; - - - - -typedef __gid_t gid_t; - - - - -typedef __mode_t mode_t; - - - - -typedef __nlink_t nlink_t; - - - - -typedef __uid_t uid_t; - - - - - -typedef __off_t off_t; -# 97 "/usr/include/sys/types.h" 3 4 -typedef __pid_t pid_t; - - - - - -typedef __id_t id_t; - - - - -typedef __ssize_t ssize_t; - - - - - -typedef __daddr_t daddr_t; -typedef __caddr_t caddr_t; - - - - - -typedef __key_t key_t; - - - - -# 1 "/usr/include/bits/types/clock_t.h" 1 3 4 - - - - - - -typedef __clock_t clock_t; -# 127 "/usr/include/sys/types.h" 2 3 4 - -# 1 "/usr/include/bits/types/clockid_t.h" 1 3 4 - - - - - - -typedef __clockid_t clockid_t; -# 129 "/usr/include/sys/types.h" 2 3 4 -# 1 "/usr/include/bits/types/time_t.h" 1 3 4 - - - - - - -typedef __time_t time_t; -# 130 "/usr/include/sys/types.h" 2 3 4 -# 1 "/usr/include/bits/types/timer_t.h" 1 3 4 - - - - - - -typedef __timer_t timer_t; -# 131 "/usr/include/sys/types.h" 2 3 4 -# 144 "/usr/include/sys/types.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 145 "/usr/include/sys/types.h" 2 3 4 - - - -typedef unsigned long int ulong; -typedef unsigned short int ushort; -typedef unsigned int uint; - - - - -# 1 "/usr/include/bits/stdint-intn.h" 1 3 4 -# 24 "/usr/include/bits/stdint-intn.h" 3 4 -typedef __int8_t int8_t; -typedef __int16_t int16_t; -typedef __int32_t int32_t; -typedef __int64_t int64_t; -# 156 "/usr/include/sys/types.h" 2 3 4 - - -typedef __uint8_t u_int8_t; -typedef __uint16_t u_int16_t; -typedef __uint32_t u_int32_t; -typedef __uint64_t u_int64_t; - - -typedef int register_t __attribute__ ((__mode__ (__word__))); -# 176 "/usr/include/sys/types.h" 3 4 -# 1 "/usr/include/endian.h" 1 3 4 -# 36 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/bits/endian.h" 1 3 4 -# 37 "/usr/include/endian.h" 2 3 4 -# 60 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/bits/byteswap.h" 1 3 4 -# 33 "/usr/include/bits/byteswap.h" 3 4 -static __inline __uint16_t -__bswap_16 (__uint16_t __bsx) -{ - - return __builtin_bswap16 (__bsx); - - - -} - - - - - - -static __inline __uint32_t -__bswap_32 (__uint32_t __bsx) -{ - - return __builtin_bswap32 (__bsx); - - - -} -# 69 "/usr/include/bits/byteswap.h" 3 4 -__extension__ static __inline __uint64_t -__bswap_64 (__uint64_t __bsx) -{ - - return __builtin_bswap64 (__bsx); - - - -} -# 61 "/usr/include/endian.h" 2 3 4 -# 1 "/usr/include/bits/uintn-identity.h" 1 3 4 -# 32 "/usr/include/bits/uintn-identity.h" 3 4 -static __inline __uint16_t -__uint16_identity (__uint16_t __x) -{ - return __x; -} - -static __inline __uint32_t -__uint32_identity (__uint32_t __x) -{ - return __x; -} - -static __inline __uint64_t -__uint64_identity (__uint64_t __x) -{ - return __x; -} -# 62 "/usr/include/endian.h" 2 3 4 -# 177 "/usr/include/sys/types.h" 2 3 4 - - -# 1 "/usr/include/sys/select.h" 1 3 4 -# 30 "/usr/include/sys/select.h" 3 4 -# 1 "/usr/include/bits/select.h" 1 3 4 -# 22 "/usr/include/bits/select.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 23 "/usr/include/bits/select.h" 2 3 4 -# 31 "/usr/include/sys/select.h" 2 3 4 - - -# 1 "/usr/include/bits/types/sigset_t.h" 1 3 4 - - - -# 1 "/usr/include/bits/types/__sigset_t.h" 1 3 4 - - - - -typedef struct -{ - unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; -} __sigset_t; -# 5 "/usr/include/bits/types/sigset_t.h" 2 3 4 - - -typedef __sigset_t sigset_t; -# 34 "/usr/include/sys/select.h" 2 3 4 - - - -# 1 "/usr/include/bits/types/struct_timeval.h" 1 3 4 - - - - - - - -struct timeval -{ - __time_t tv_sec; - __suseconds_t tv_usec; -}; -# 38 "/usr/include/sys/select.h" 2 3 4 - -# 1 "/usr/include/bits/types/struct_timespec.h" 1 3 4 -# 9 "/usr/include/bits/types/struct_timespec.h" 3 4 -struct timespec -{ - __time_t tv_sec; - __syscall_slong_t tv_nsec; -}; -# 40 "/usr/include/sys/select.h" 2 3 4 - - - -typedef __suseconds_t suseconds_t; - - - - - -typedef long int __fd_mask; -# 59 "/usr/include/sys/select.h" 3 4 -typedef struct - { - - - - - - - __fd_mask __fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; - - - } fd_set; - - - - - - -typedef __fd_mask fd_mask; -# 91 "/usr/include/sys/select.h" 3 4 - -# 101 "/usr/include/sys/select.h" 3 4 -extern int select (int __nfds, fd_set *__restrict __readfds, - fd_set *__restrict __writefds, - fd_set *__restrict __exceptfds, - struct timeval *__restrict __timeout); -# 113 "/usr/include/sys/select.h" 3 4 -extern int pselect (int __nfds, fd_set *__restrict __readfds, - fd_set *__restrict __writefds, - fd_set *__restrict __exceptfds, - const struct timespec *__restrict __timeout, - const __sigset_t *__restrict __sigmask); -# 126 "/usr/include/sys/select.h" 3 4 - -# 180 "/usr/include/sys/types.h" 2 3 4 - - - - - -typedef __blksize_t blksize_t; - - - - - - -typedef __blkcnt_t blkcnt_t; - - - -typedef __fsblkcnt_t fsblkcnt_t; - - - -typedef __fsfilcnt_t fsfilcnt_t; -# 227 "/usr/include/sys/types.h" 3 4 -# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 -# 23 "/usr/include/bits/pthreadtypes.h" 3 4 -# 1 "/usr/include/bits/thread-shared-types.h" 1 3 4 -# 77 "/usr/include/bits/thread-shared-types.h" 3 4 -# 1 "/usr/include/bits/pthreadtypes-arch.h" 1 3 4 -# 21 "/usr/include/bits/pthreadtypes-arch.h" 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 22 "/usr/include/bits/pthreadtypes-arch.h" 2 3 4 -# 65 "/usr/include/bits/pthreadtypes-arch.h" 3 4 -struct __pthread_rwlock_arch_t -{ - unsigned int __readers; - unsigned int __writers; - unsigned int __wrphase_futex; - unsigned int __writers_futex; - unsigned int __pad3; - unsigned int __pad4; - - int __cur_writer; - int __shared; - signed char __rwelision; - - - - - unsigned char __pad1[7]; - - - unsigned long int __pad2; - - - unsigned int __flags; -# 99 "/usr/include/bits/pthreadtypes-arch.h" 3 4 -}; -# 78 "/usr/include/bits/thread-shared-types.h" 2 3 4 - - - - -typedef struct __pthread_internal_list -{ - struct __pthread_internal_list *__prev; - struct __pthread_internal_list *__next; -} __pthread_list_t; -# 118 "/usr/include/bits/thread-shared-types.h" 3 4 -struct __pthread_mutex_s -{ - int __lock ; - unsigned int __count; - int __owner; - - unsigned int __nusers; -# 148 "/usr/include/bits/thread-shared-types.h" 3 4 - int __kind; - - - - - - short __spins; short __elision; - __pthread_list_t __list; -# 165 "/usr/include/bits/thread-shared-types.h" 3 4 - -}; - - - - -struct __pthread_cond_s -{ - __extension__ union - { - __extension__ unsigned long long int __wseq; - struct - { - unsigned int __low; - unsigned int __high; - } __wseq32; - }; - __extension__ union - { - __extension__ unsigned long long int __g1_start; - struct - { - unsigned int __low; - unsigned int __high; - } __g1_start32; - }; - unsigned int __g_refs[2] ; - unsigned int __g_size[2]; - unsigned int __g1_orig_size; - unsigned int __wrefs; - unsigned int __g_signals[2]; -}; -# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 - - - -typedef unsigned long int pthread_t; - - - - -typedef union -{ - char __size[4]; - int __align; -} pthread_mutexattr_t; - - - - -typedef union -{ - char __size[4]; - int __align; -} pthread_condattr_t; - - - -typedef unsigned int pthread_key_t; - - - -typedef int pthread_once_t; - - -union pthread_attr_t -{ - char __size[56]; - long int __align; -}; - -typedef union pthread_attr_t pthread_attr_t; - - - - -typedef union -{ - struct __pthread_mutex_s __data; - char __size[40]; - long int __align; -} pthread_mutex_t; - - -typedef union -{ - struct __pthread_cond_s __data; - char __size[48]; - __extension__ long long int __align; -} pthread_cond_t; - - - - - -typedef union -{ - struct __pthread_rwlock_arch_t __data; - char __size[56]; - long int __align; -} pthread_rwlock_t; - -typedef union -{ - char __size[8]; - long int __align; -} pthread_rwlockattr_t; - - - - - -typedef volatile int pthread_spinlock_t; - - - - -typedef union -{ - char __size[32]; - long int __align; -} pthread_barrier_t; - -typedef union -{ - char __size[4]; - int __align; -} pthread_barrierattr_t; -# 228 "/usr/include/sys/types.h" 2 3 4 - - - -# 395 "/usr/include/stdlib.h" 2 3 4 - - - - - - -extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); - - -extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern char *initstate (unsigned int __seed, char *__statebuf, - size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - - - -extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - - - -struct random_data - { - int32_t *fptr; - int32_t *rptr; - int32_t *state; - int rand_type; - int rand_deg; - int rand_sep; - int32_t *end_ptr; - }; - -extern int random_r (struct random_data *__restrict __buf, - int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - -extern int srandom_r (unsigned int __seed, struct random_data *__buf) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - -extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, - size_t __statelen, - struct random_data *__restrict __buf) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); - -extern int setstate_r (char *__restrict __statebuf, - struct random_data *__restrict __buf) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - - - -extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); - -extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); -extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - -extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); -extern long int nrand48 (unsigned short int __xsubi[3]) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - -extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); -extern long int jrand48 (unsigned short int __xsubi[3]) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - -extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); -extern unsigned short int *seed48 (unsigned short int __seed16v[3]) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - -struct drand48_data - { - unsigned short int __x[3]; - unsigned short int __old_x[3]; - unsigned short int __c; - unsigned short int __init; - __extension__ unsigned long long int __a; - - }; - - -extern int drand48_r (struct drand48_data *__restrict __buffer, - double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -extern int erand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int lrand48_r (struct drand48_data *__restrict __buffer, - long int *__restrict __result) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -extern int nrand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int mrand48_r (struct drand48_data *__restrict __buffer, - long int *__restrict __result) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -extern int jrand48_r (unsigned short int __xsubi[3], - struct drand48_data *__restrict __buffer, - long int *__restrict __result) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int srand48_r (long int __seedval, struct drand48_data *__buffer) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - -extern int seed48_r (unsigned short int __seed16v[3], - struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - -extern int lcong48_r (unsigned short int __param[7], - struct drand48_data *__buffer) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - - -extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ; - -extern void *calloc (size_t __nmemb, size_t __size) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ; - - - - - - -extern void *realloc (void *__ptr, size_t __size) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); - - - - - - - -extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); - - - -extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); - - -# 1 "/usr/include/alloca.h" 1 3 4 -# 24 "/usr/include/alloca.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 25 "/usr/include/alloca.h" 2 3 4 - - - - - - - -extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -# 567 "/usr/include/stdlib.h" 2 3 4 - - - - - -extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ; - - - - -extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ; - - - - -extern void *aligned_alloc (size_t __alignment, size_t __size) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) ; - - - -extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); - - - -extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - - - -extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - - -extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - -extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); - - - - - -extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); - - - - - -extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); - - - - -extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ; -# 644 "/usr/include/stdlib.h" 3 4 -extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - -extern int setenv (const char *__name, const char *__value, int __replace) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - - -extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - - - - -extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); -# 672 "/usr/include/stdlib.h" 3 4 -extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -# 685 "/usr/include/stdlib.h" 3 4 -extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ; -# 707 "/usr/include/stdlib.h" 3 4 -extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ; -# 728 "/usr/include/stdlib.h" 3 4 -extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ; -# 781 "/usr/include/stdlib.h" 3 4 -extern int system (const char *__command) ; -# 797 "/usr/include/stdlib.h" 3 4 -extern char *realpath (const char *__restrict __name, - char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) ; - - - - - - -typedef int (*__compar_fn_t) (const void *, const void *); -# 817 "/usr/include/stdlib.h" 3 4 -extern void *bsearch (const void *__key, const void *__base, - size_t __nmemb, size_t __size, __compar_fn_t __compar) - __attribute__ ((__nonnull__ (1, 2, 5))) ; - - - - - - - -extern void qsort (void *__base, size_t __nmemb, size_t __size, - __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); -# 837 "/usr/include/stdlib.h" 3 4 -extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; -extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; - - -__extension__ extern long long int llabs (long long int __x) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; - - - - - - -extern div_t div (int __numer, int __denom) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; -extern ldiv_t ldiv (long int __numer, long int __denom) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; - - -__extension__ extern lldiv_t lldiv (long long int __numer, - long long int __denom) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) ; -# 869 "/usr/include/stdlib.h" 3 4 -extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ; - - - - -extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ; - - - - -extern char *gcvt (double __value, int __ndigit, char *__buf) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ; - - - - -extern char *qecvt (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ; -extern char *qfcvt (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) ; -extern char *qgcvt (long double __value, int __ndigit, char *__buf) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) ; - - - - -extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign, char *__restrict __buf, - size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); -extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, - int *__restrict __sign, char *__restrict __buf, - size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); - -extern int qecvt_r (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign, - char *__restrict __buf, size_t __len) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); -extern int qfcvt_r (long double __value, int __ndigit, - int *__restrict __decpt, int *__restrict __sign, - char *__restrict __buf, size_t __len) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); - - - - - -extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int mbtowc (wchar_t *__restrict __pwc, - const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern size_t mbstowcs (wchar_t *__restrict __pwcs, - const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); - -extern size_t wcstombs (char *__restrict __s, - const wchar_t *__restrict __pwcs, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) ; -# 954 "/usr/include/stdlib.h" 3 4 -extern int getsubopt (char **__restrict __optionp, - char *const *__restrict __tokens, - char **__restrict __valuep) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) ; -# 1000 "/usr/include/stdlib.h" 3 4 -extern int getloadavg (double __loadavg[], int __nelem) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -# 1010 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/include/bits/stdlib-float.h" 1 3 4 -# 1011 "/usr/include/stdlib.h" 2 3 4 -# 1020 "/usr/include/stdlib.h" 3 4 - -# 2 "scope.c" 2 -# 1 "/usr/include/string.h" 1 3 4 -# 26 "/usr/include/string.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 27 "/usr/include/string.h" 2 3 4 - - - - - - -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 34 "/usr/include/string.h" 2 3 4 -# 42 "/usr/include/string.h" 3 4 -extern void *memcpy (void *__restrict __dest, const void *__restrict __src, - size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern void *memmove (void *__dest, const void *__src, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - - - -extern void *memccpy (void *__restrict __dest, const void *__restrict __src, - int __c, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - - -extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - -extern int memcmp (const void *__s1, const void *__s2, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 90 "/usr/include/string.h" 3 4 -extern void *memchr (const void *__s, int __c, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 121 "/usr/include/string.h" 3 4 -extern char *strcpy (char *__restrict __dest, const char *__restrict __src) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - -extern char *strncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern char *strcat (char *__restrict __dest, const char *__restrict __src) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - -extern char *strncat (char *__restrict __dest, const char *__restrict __src, - size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int strcmp (const char *__s1, const char *__s2) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - -extern int strncmp (const char *__s1, const char *__s2, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int strcoll (const char *__s1, const char *__s2) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - -extern size_t strxfrm (char *__restrict __dest, - const char *__restrict __src, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - - - -# 1 "/usr/include/bits/types/locale_t.h" 1 3 4 -# 22 "/usr/include/bits/types/locale_t.h" 3 4 -# 1 "/usr/include/bits/types/__locale_t.h" 1 3 4 -# 28 "/usr/include/bits/types/__locale_t.h" 3 4 -struct __locale_struct -{ - - struct __locale_data *__locales[13]; - - - const unsigned short int *__ctype_b; - const int *__ctype_tolower; - const int *__ctype_toupper; - - - const char *__names[13]; -}; - -typedef struct __locale_struct *__locale_t; -# 23 "/usr/include/bits/types/locale_t.h" 2 3 4 - -typedef __locale_t locale_t; -# 153 "/usr/include/string.h" 2 3 4 - - -extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); - - -extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, - locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); - - - - - -extern char *strdup (const char *__s) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); - - - - - - -extern char *strndup (const char *__string, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); -# 225 "/usr/include/string.h" 3 4 -extern char *strchr (const char *__s, int __c) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 252 "/usr/include/string.h" 3 4 -extern char *strrchr (const char *__s, int __c) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 272 "/usr/include/string.h" 3 4 -extern size_t strcspn (const char *__s, const char *__reject) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern size_t strspn (const char *__s, const char *__accept) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 302 "/usr/include/string.h" 3 4 -extern char *strpbrk (const char *__s, const char *__accept) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); -# 329 "/usr/include/string.h" 3 4 -extern char *strstr (const char *__haystack, const char *__needle) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - - - -extern char *strtok (char *__restrict __s, const char *__restrict __delim) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); - - - -extern char *__strtok_r (char *__restrict __s, - const char *__restrict __delim, - char **__restrict __save_ptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); - -extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, - char **__restrict __save_ptr) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); -# 384 "/usr/include/string.h" 3 4 -extern size_t strlen (const char *__s) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - -extern size_t strnlen (const char *__string, size_t __maxlen) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - -extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); -# 409 "/usr/include/string.h" 3 4 -extern int strerror_r (int __errnum, char *__buf, size_t __buflen) __asm__ ("" "__xpg_strerror_r") __attribute__ ((__nothrow__ , __leaf__)) - - __attribute__ ((__nonnull__ (2))); -# 427 "/usr/include/string.h" 3 4 -extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); - - - -# 1 "/usr/include/strings.h" 1 3 4 -# 23 "/usr/include/strings.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 24 "/usr/include/strings.h" 2 3 4 - - - - - - - - - - -extern int bcmp (const void *__s1, const void *__s2, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern void bcopy (const void *__src, void *__dest, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); -# 68 "/usr/include/strings.h" 3 4 -extern char *index (const char *__s, int __c) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); -# 96 "/usr/include/strings.h" 3 4 -extern char *rindex (const char *__s, int __c) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); - - - - - - -extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - - -extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); -__extension__ extern int ffsll (long long int __ll) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - -extern int strcasecmp (const char *__s1, const char *__s2) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - -extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); - - - - - - -extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); - - - -extern int strncasecmp_l (const char *__s1, const char *__s2, - size_t __n, locale_t __loc) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); - - - -# 432 "/usr/include/string.h" 2 3 4 - - - -extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); - - - -extern char *strsep (char **__restrict __stringp, - const char *__restrict __delim) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - - -extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); - - -extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); - - - -extern char *__stpncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -extern char *stpncpy (char *__restrict __dest, - const char *__restrict __src, size_t __n) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); -# 498 "/usr/include/string.h" 3 4 - -# 3 "scope.c" 2 - -# 1 "scope.h" 1 - - - -# 1 "/usr/include/llvm-c/Core.h" 1 3 4 -# 18 "/usr/include/llvm-c/Core.h" 3 4 -# 1 "/usr/include/llvm-c/ErrorHandling.h" 1 3 4 -# 21 "/usr/include/llvm-c/ErrorHandling.h" 3 4 -typedef void (*LLVMFatalErrorHandler)(const char *Reason); -# 30 "/usr/include/llvm-c/ErrorHandling.h" 3 4 -void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler); - - - - - -void LLVMResetFatalErrorHandler(void); - - - - - - -void LLVMEnablePrettyStackTrace(void); -# 19 "/usr/include/llvm-c/Core.h" 2 3 4 -# 1 "/usr/include/llvm-c/Types.h" 1 3 4 -# 17 "/usr/include/llvm-c/Types.h" 3 4 -# 1 "/usr/include/llvm-c/DataTypes.h" 1 3 4 -# 30 "/usr/include/llvm-c/DataTypes.h" 3 4 -# 1 "/usr/include/math.h" 1 3 4 -# 27 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 28 "/usr/include/math.h" 2 3 4 - - - - - - - - - - - - -# 1 "/usr/include/bits/math-vector.h" 1 3 4 -# 25 "/usr/include/bits/math-vector.h" 3 4 -# 1 "/usr/include/bits/libm-simd-decl-stubs.h" 1 3 4 -# 26 "/usr/include/bits/math-vector.h" 2 3 4 -# 41 "/usr/include/math.h" 2 3 4 -# 138 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/flt-eval-method.h" 1 3 4 -# 139 "/usr/include/math.h" 2 3 4 -# 149 "/usr/include/math.h" 3 4 -typedef float float_t; -typedef double double_t; -# 190 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/fp-logb.h" 1 3 4 -# 191 "/usr/include/math.h" 2 3 4 -# 233 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/fp-fast.h" 1 3 4 -# 234 "/usr/include/math.h" 2 3 4 -# 289 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - -extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - - -extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); -# 290 "/usr/include/math.h" 2 3 4 -# 1 "/usr/include/bits/mathcalls.h" 1 3 4 -# 53 "/usr/include/bits/mathcalls.h" 3 4 -extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); -# 85 "/usr/include/bits/mathcalls.h" 3 4 -extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); - - - extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); -# 119 "/usr/include/bits/mathcalls.h" 3 4 -extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); -# 177 "/usr/include/bits/mathcalls.h" 3 4 -extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); -# 211 "/usr/include/bits/mathcalls.h" 3 4 -extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - - -extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); -extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__)); -extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - -extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); -# 272 "/usr/include/bits/mathcalls.h" 3 4 -extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); -# 290 "/usr/include/bits/mathcalls.h" 3 4 -extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - -extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); -# 396 "/usr/include/bits/mathcalls.h" 3 4 -extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); -# 291 "/usr/include/math.h" 2 3 4 -# 306 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - -extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - - -extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); -# 307 "/usr/include/math.h" 2 3 4 -# 1 "/usr/include/bits/mathcalls.h" 1 3 4 -# 53 "/usr/include/bits/mathcalls.h" 3 4 -extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); -# 85 "/usr/include/bits/mathcalls.h" 3 4 -extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); - - - extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); -# 119 "/usr/include/bits/mathcalls.h" 3 4 -extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); -# 177 "/usr/include/bits/mathcalls.h" 3 4 -extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); -# 211 "/usr/include/bits/mathcalls.h" 3 4 -extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - - -extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); -extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); -extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - -extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); -# 272 "/usr/include/bits/mathcalls.h" 3 4 -extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); -# 290 "/usr/include/bits/mathcalls.h" 3 4 -extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - -extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); -# 396 "/usr/include/bits/mathcalls.h" 3 4 -extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); -# 308 "/usr/include/math.h" 2 3 4 -# 349 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - -extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - - -extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); -# 350 "/usr/include/math.h" 2 3 4 -# 1 "/usr/include/bits/mathcalls.h" 1 3 4 -# 53 "/usr/include/bits/mathcalls.h" 3 4 -extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); -# 85 "/usr/include/bits/mathcalls.h" 3 4 -extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); - - - extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); -# 119 "/usr/include/bits/mathcalls.h" 3 4 -extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); -# 177 "/usr/include/bits/mathcalls.h" 3 4 -extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); -# 211 "/usr/include/bits/mathcalls.h" 3 4 -extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - - -extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); -extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - -extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - -extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); -# 272 "/usr/include/bits/mathcalls.h" 3 4 -extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); -# 290 "/usr/include/bits/mathcalls.h" 3 4 -extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - -extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - - - -extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); -__extension__ -extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); -# 396 "/usr/include/bits/mathcalls.h" 3 4 -extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); -# 351 "/usr/include/math.h" 2 3 4 -# 420 "/usr/include/math.h" 3 4 -# 1 "/usr/include/bits/mathcalls-helper-functions.h" 1 3 4 -# 21 "/usr/include/bits/mathcalls-helper-functions.h" 3 4 -extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - -extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); - - - -extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); - - -extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) - __attribute__ ((__const__)); -# 421 "/usr/include/math.h" 2 3 4 -# 773 "/usr/include/math.h" 3 4 -extern int signgam; -# 853 "/usr/include/math.h" 3 4 -enum - { - FP_NAN = - - 0, - FP_INFINITE = - - 1, - FP_ZERO = - - 2, - FP_SUBNORMAL = - - 3, - FP_NORMAL = - - 4 - }; -# 1553 "/usr/include/math.h" 3 4 - -# 31 "/usr/include/llvm-c/DataTypes.h" 2 3 4 - - -# 1 "/usr/include/inttypes.h" 1 3 4 -# 27 "/usr/include/inttypes.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h" 1 3 4 -# 9 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h" 3 4 -# 1 "/usr/include/stdint.h" 1 3 4 -# 26 "/usr/include/stdint.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 27 "/usr/include/stdint.h" 2 3 4 - -# 1 "/usr/include/bits/wchar.h" 1 3 4 -# 29 "/usr/include/stdint.h" 2 3 4 -# 1 "/usr/include/bits/wordsize.h" 1 3 4 -# 30 "/usr/include/stdint.h" 2 3 4 - - - - - - - -# 1 "/usr/include/bits/stdint-uintn.h" 1 3 4 -# 24 "/usr/include/bits/stdint-uintn.h" 3 4 -typedef __uint8_t uint8_t; -typedef __uint16_t uint16_t; -typedef __uint32_t uint32_t; -typedef __uint64_t uint64_t; -# 38 "/usr/include/stdint.h" 2 3 4 - - - - - -typedef __int_least8_t int_least8_t; -typedef __int_least16_t int_least16_t; -typedef __int_least32_t int_least32_t; -typedef __int_least64_t int_least64_t; - - -typedef __uint_least8_t uint_least8_t; -typedef __uint_least16_t uint_least16_t; -typedef __uint_least32_t uint_least32_t; -typedef __uint_least64_t uint_least64_t; - - - - - -typedef signed char int_fast8_t; - -typedef long int int_fast16_t; -typedef long int int_fast32_t; -typedef long int int_fast64_t; -# 71 "/usr/include/stdint.h" 3 4 -typedef unsigned char uint_fast8_t; - -typedef unsigned long int uint_fast16_t; -typedef unsigned long int uint_fast32_t; -typedef unsigned long int uint_fast64_t; -# 87 "/usr/include/stdint.h" 3 4 -typedef long int intptr_t; - - -typedef unsigned long int uintptr_t; -# 101 "/usr/include/stdint.h" 3 4 -typedef __intmax_t intmax_t; -typedef __uintmax_t uintmax_t; -# 10 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h" 2 3 4 -# 28 "/usr/include/inttypes.h" 2 3 4 - - - - - - -typedef int __gwchar_t; -# 266 "/usr/include/inttypes.h" 3 4 - - - - - -typedef struct - { - long int quot; - long int rem; - } imaxdiv_t; -# 290 "/usr/include/inttypes.h" 3 4 -extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); - - -extern intmax_t strtoimax (const char *__restrict __nptr, - char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); - - -extern uintmax_t strtoumax (const char *__restrict __nptr, - char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); - - -extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, - __gwchar_t **__restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)); - - -extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, - __gwchar_t ** __restrict __endptr, int __base) - __attribute__ ((__nothrow__ , __leaf__)); -# 432 "/usr/include/inttypes.h" 3 4 - -# 34 "/usr/include/llvm-c/DataTypes.h" 2 3 4 -# 18 "/usr/include/llvm-c/Types.h" 2 3 4 -# 29 "/usr/include/llvm-c/Types.h" 3 4 -typedef int LLVMBool; -# 49 "/usr/include/llvm-c/Types.h" 3 4 -typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; - - - - -typedef struct LLVMOpaqueContext *LLVMContextRef; - - - - - - - -typedef struct LLVMOpaqueModule *LLVMModuleRef; - - - - - - -typedef struct LLVMOpaqueType *LLVMTypeRef; - - - - - - -typedef struct LLVMOpaqueValue *LLVMValueRef; - - - - - - -typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef; - - - - - - -typedef struct LLVMOpaqueMetadata *LLVMMetadataRef; - - - - - - -typedef struct LLVMOpaqueNamedMDNode *LLVMNamedMDNodeRef; - - - - - - -typedef struct LLVMOpaqueValueMetadataEntry LLVMValueMetadataEntry; - - - - - - -typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; - - - - - - -typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef; - - - - - - -typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; - - -typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; - - -typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef; - - - - - -typedef struct LLVMOpaqueUse *LLVMUseRef; - - - - - - -typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef; - - - - -typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef; - - - - -typedef struct LLVMComdat *LLVMComdatRef; - - - - -typedef struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry; - - - - -typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef; -# 20 "/usr/include/llvm-c/Core.h" 2 3 4 -# 59 "/usr/include/llvm-c/Core.h" 3 4 -typedef enum { - - LLVMRet = 1, - LLVMBr = 2, - LLVMSwitch = 3, - LLVMIndirectBr = 4, - LLVMInvoke = 5, - - LLVMUnreachable = 7, - - - LLVMFNeg = 66, - - - LLVMAdd = 8, - LLVMFAdd = 9, - LLVMSub = 10, - LLVMFSub = 11, - LLVMMul = 12, - LLVMFMul = 13, - LLVMUDiv = 14, - LLVMSDiv = 15, - LLVMFDiv = 16, - LLVMURem = 17, - LLVMSRem = 18, - LLVMFRem = 19, - - - LLVMShl = 20, - LLVMLShr = 21, - LLVMAShr = 22, - LLVMAnd = 23, - LLVMOr = 24, - LLVMXor = 25, - - - LLVMAlloca = 26, - LLVMLoad = 27, - LLVMStore = 28, - LLVMGetElementPtr = 29, - - - LLVMTrunc = 30, - LLVMZExt = 31, - LLVMSExt = 32, - LLVMFPToUI = 33, - LLVMFPToSI = 34, - LLVMUIToFP = 35, - LLVMSIToFP = 36, - LLVMFPTrunc = 37, - LLVMFPExt = 38, - LLVMPtrToInt = 39, - LLVMIntToPtr = 40, - LLVMBitCast = 41, - LLVMAddrSpaceCast = 60, - - - LLVMICmp = 42, - LLVMFCmp = 43, - LLVMPHI = 44, - LLVMCall = 45, - LLVMSelect = 46, - LLVMUserOp1 = 47, - LLVMUserOp2 = 48, - LLVMVAArg = 49, - LLVMExtractElement = 50, - LLVMInsertElement = 51, - LLVMShuffleVector = 52, - LLVMExtractValue = 53, - LLVMInsertValue = 54, - - - LLVMFence = 55, - LLVMAtomicCmpXchg = 56, - LLVMAtomicRMW = 57, - - - LLVMResume = 58, - LLVMLandingPad = 59, - LLVMCleanupRet = 61, - LLVMCatchRet = 62, - LLVMCatchPad = 63, - LLVMCleanupPad = 64, - LLVMCatchSwitch = 65 -} LLVMOpcode; - -typedef enum { - LLVMVoidTypeKind, - LLVMHalfTypeKind, - LLVMFloatTypeKind, - LLVMDoubleTypeKind, - LLVMX86_FP80TypeKind, - LLVMFP128TypeKind, - LLVMPPC_FP128TypeKind, - LLVMLabelTypeKind, - LLVMIntegerTypeKind, - LLVMFunctionTypeKind, - LLVMStructTypeKind, - LLVMArrayTypeKind, - LLVMPointerTypeKind, - LLVMVectorTypeKind, - LLVMMetadataTypeKind, - LLVMX86_MMXTypeKind, - LLVMTokenTypeKind -} LLVMTypeKind; - -typedef enum { - LLVMExternalLinkage, - LLVMAvailableExternallyLinkage, - LLVMLinkOnceAnyLinkage, - LLVMLinkOnceODRLinkage, - - LLVMLinkOnceODRAutoHideLinkage, - LLVMWeakAnyLinkage, - LLVMWeakODRLinkage, - - LLVMAppendingLinkage, - LLVMInternalLinkage, - - LLVMPrivateLinkage, - LLVMDLLImportLinkage, - LLVMDLLExportLinkage, - LLVMExternalWeakLinkage, - LLVMGhostLinkage, - LLVMCommonLinkage, - LLVMLinkerPrivateLinkage, - LLVMLinkerPrivateWeakLinkage -} LLVMLinkage; - -typedef enum { - LLVMDefaultVisibility, - LLVMHiddenVisibility, - LLVMProtectedVisibility -} LLVMVisibility; - -typedef enum { - LLVMNoUnnamedAddr, - LLVMLocalUnnamedAddr, - LLVMGlobalUnnamedAddr -} LLVMUnnamedAddr; - -typedef enum { - LLVMDefaultStorageClass = 0, - LLVMDLLImportStorageClass = 1, - LLVMDLLExportStorageClass = 2 -} LLVMDLLStorageClass; - -typedef enum { - LLVMCCallConv = 0, - LLVMFastCallConv = 8, - LLVMColdCallConv = 9, - LLVMGHCCallConv = 10, - LLVMHiPECallConv = 11, - LLVMWebKitJSCallConv = 12, - LLVMAnyRegCallConv = 13, - LLVMPreserveMostCallConv = 14, - LLVMPreserveAllCallConv = 15, - LLVMSwiftCallConv = 16, - LLVMCXXFASTTLSCallConv = 17, - LLVMX86StdcallCallConv = 64, - LLVMX86FastcallCallConv = 65, - LLVMARMAPCSCallConv = 66, - LLVMARMAAPCSCallConv = 67, - LLVMARMAAPCSVFPCallConv = 68, - LLVMMSP430INTRCallConv = 69, - LLVMX86ThisCallCallConv = 70, - LLVMPTXKernelCallConv = 71, - LLVMPTXDeviceCallConv = 72, - LLVMSPIRFUNCCallConv = 75, - LLVMSPIRKERNELCallConv = 76, - LLVMIntelOCLBICallConv = 77, - LLVMX8664SysVCallConv = 78, - LLVMWin64CallConv = 79, - LLVMX86VectorCallCallConv = 80, - LLVMHHVMCallConv = 81, - LLVMHHVMCCallConv = 82, - LLVMX86INTRCallConv = 83, - LLVMAVRINTRCallConv = 84, - LLVMAVRSIGNALCallConv = 85, - LLVMAVRBUILTINCallConv = 86, - LLVMAMDGPUVSCallConv = 87, - LLVMAMDGPUGSCallConv = 88, - LLVMAMDGPUPSCallConv = 89, - LLVMAMDGPUCSCallConv = 90, - LLVMAMDGPUKERNELCallConv = 91, - LLVMX86RegCallCallConv = 92, - LLVMAMDGPUHSCallConv = 93, - LLVMMSP430BUILTINCallConv = 94, - LLVMAMDGPULSCallConv = 95, - LLVMAMDGPUESCallConv = 96 -} LLVMCallConv; - -typedef enum { - LLVMArgumentValueKind, - LLVMBasicBlockValueKind, - LLVMMemoryUseValueKind, - LLVMMemoryDefValueKind, - LLVMMemoryPhiValueKind, - - LLVMFunctionValueKind, - LLVMGlobalAliasValueKind, - LLVMGlobalIFuncValueKind, - LLVMGlobalVariableValueKind, - LLVMBlockAddressValueKind, - LLVMConstantExprValueKind, - LLVMConstantArrayValueKind, - LLVMConstantStructValueKind, - LLVMConstantVectorValueKind, - - LLVMUndefValueValueKind, - LLVMConstantAggregateZeroValueKind, - LLVMConstantDataArrayValueKind, - LLVMConstantDataVectorValueKind, - LLVMConstantIntValueKind, - LLVMConstantFPValueKind, - LLVMConstantPointerNullValueKind, - LLVMConstantTokenNoneValueKind, - - LLVMMetadataAsValueValueKind, - LLVMInlineAsmValueKind, - - LLVMInstructionValueKind, -} LLVMValueKind; - -typedef enum { - LLVMIntEQ = 32, - LLVMIntNE, - LLVMIntUGT, - LLVMIntUGE, - LLVMIntULT, - LLVMIntULE, - LLVMIntSGT, - LLVMIntSGE, - LLVMIntSLT, - LLVMIntSLE -} LLVMIntPredicate; - -typedef enum { - LLVMRealPredicateFalse, - LLVMRealOEQ, - LLVMRealOGT, - LLVMRealOGE, - LLVMRealOLT, - LLVMRealOLE, - LLVMRealONE, - LLVMRealORD, - LLVMRealUNO, - LLVMRealUEQ, - LLVMRealUGT, - LLVMRealUGE, - LLVMRealULT, - LLVMRealULE, - LLVMRealUNE, - LLVMRealPredicateTrue -} LLVMRealPredicate; - -typedef enum { - LLVMLandingPadCatch, - LLVMLandingPadFilter -} LLVMLandingPadClauseTy; - -typedef enum { - LLVMNotThreadLocal = 0, - LLVMGeneralDynamicTLSModel, - LLVMLocalDynamicTLSModel, - LLVMInitialExecTLSModel, - LLVMLocalExecTLSModel -} LLVMThreadLocalMode; - -typedef enum { - LLVMAtomicOrderingNotAtomic = 0, - LLVMAtomicOrderingUnordered = 1, - - LLVMAtomicOrderingMonotonic = 2, - - - LLVMAtomicOrderingAcquire = 4, - - - LLVMAtomicOrderingRelease = 5, - - - LLVMAtomicOrderingAcquireRelease = 6, - - - - LLVMAtomicOrderingSequentiallyConsistent = 7 - - - - - - - -} LLVMAtomicOrdering; - -typedef enum { - LLVMAtomicRMWBinOpXchg, - LLVMAtomicRMWBinOpAdd, - LLVMAtomicRMWBinOpSub, - LLVMAtomicRMWBinOpAnd, - LLVMAtomicRMWBinOpNand, - LLVMAtomicRMWBinOpOr, - LLVMAtomicRMWBinOpXor, - LLVMAtomicRMWBinOpMax, - - - LLVMAtomicRMWBinOpMin, - - - LLVMAtomicRMWBinOpUMax, - - - LLVMAtomicRMWBinOpUMin - - -} LLVMAtomicRMWBinOp; - -typedef enum { - LLVMDSError, - LLVMDSWarning, - LLVMDSRemark, - LLVMDSNote -} LLVMDiagnosticSeverity; - -typedef enum { - LLVMInlineAsmDialectATT, - LLVMInlineAsmDialectIntel -} LLVMInlineAsmDialect; - -typedef enum { - - - - - - - LLVMModuleFlagBehaviorError, - - - - - - - LLVMModuleFlagBehaviorWarning, -# 415 "/usr/include/llvm-c/Core.h" 3 4 - LLVMModuleFlagBehaviorRequire, - - - - - - - - LLVMModuleFlagBehaviorOverride, - - - - - - LLVMModuleFlagBehaviorAppend, - - - - - - - - LLVMModuleFlagBehaviorAppendUnique, -} LLVMModuleFlagBehavior; - - - - - -enum { - LLVMAttributeReturnIndex = 0U, - - - - LLVMAttributeFunctionIndex = -1, -}; - -typedef unsigned LLVMAttributeIndex; - - - - - -void LLVMInitializeCore(LLVMPassRegistryRef R); - - - - -void LLVMShutdown(void); - - - -char *LLVMCreateMessage(const char *Message); -void LLVMDisposeMessage(char *Message); -# 482 "/usr/include/llvm-c/Core.h" 3 4 -typedef void (*LLVMDiagnosticHandler)(LLVMDiagnosticInfoRef, void *); -typedef void (*LLVMYieldCallback)(LLVMContextRef, void *); - - - - - - - -LLVMContextRef LLVMContextCreate(void); - - - - -LLVMContextRef LLVMGetGlobalContext(void); - - - - -void LLVMContextSetDiagnosticHandler(LLVMContextRef C, - LLVMDiagnosticHandler Handler, - void *DiagnosticContext); - - - - -LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C); - - - - -void *LLVMContextGetDiagnosticContext(LLVMContextRef C); - - - - - - -void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback, - void *OpaqueHandle); - - - - - - -LLVMBool LLVMContextShouldDiscardValueNames(LLVMContextRef C); -# 538 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMContextSetDiscardValueNames(LLVMContextRef C, LLVMBool Discard); - - - - - - - -void LLVMContextDispose(LLVMContextRef C); - - - - - - - -char *LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI); - - - - - - -LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI); - -unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name, - unsigned SLen); -unsigned LLVMGetMDKindID(const char *Name, unsigned SLen); -# 578 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen); -unsigned LLVMGetLastEnumAttributeKind(void); - - - - -LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned KindID, - uint64_t Val); - - - - - -unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A); - - - - -uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A); - - - - -LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C, - const char *K, unsigned KLength, - const char *V, unsigned VLength); - - - - -const char *LLVMGetStringAttributeKind(LLVMAttributeRef A, unsigned *Length); - - - - -const char *LLVMGetStringAttributeValue(LLVMAttributeRef A, unsigned *Length); - - - - -LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A); -LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A); -# 644 "/usr/include/llvm-c/Core.h" 3 4 -LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID); - - - - - - - -LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, - LLVMContextRef C); - - - -LLVMModuleRef LLVMCloneModule(LLVMModuleRef M); - - - - - - - -void LLVMDisposeModule(LLVMModuleRef M); -# 675 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len); -# 685 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len); -# 695 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len); -# 706 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name, size_t Len); -# 717 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetDataLayoutStr(LLVMModuleRef M); -const char *LLVMGetDataLayout(LLVMModuleRef M); - - - - - - -void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr); - - - - - - -const char *LLVMGetTarget(LLVMModuleRef M); - - - - - - -void LLVMSetTarget(LLVMModuleRef M, const char *Triple); -# 748 "/usr/include/llvm-c/Core.h" 3 4 -LLVMModuleFlagEntry *LLVMCopyModuleFlagsMetadata(LLVMModuleRef M, size_t *Len); - - - - -void LLVMDisposeModuleFlagsMetadata(LLVMModuleFlagEntry *Entries); - - - - - - -LLVMModuleFlagBehavior -LLVMModuleFlagEntriesGetFlagBehavior(LLVMModuleFlagEntry *Entries, - unsigned Index); - - - - - - -const char *LLVMModuleFlagEntriesGetKey(LLVMModuleFlagEntry *Entries, - unsigned Index, size_t *Len); - - - - - - -LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry *Entries, - unsigned Index); - - - - - - - -LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M, - const char *Key, size_t KeyLen); - - - - - - - -void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, - const char *Key, size_t KeyLen, - LLVMMetadataRef Val); - - - - - - -void LLVMDumpModule(LLVMModuleRef M); - - - - - - - -LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename, - char **ErrorMessage); - - - - - - - -char *LLVMPrintModuleToString(LLVMModuleRef M); - - - - - - -const char *LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len); - - - - - - -void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm, size_t Len); - - - - - - -void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm, size_t Len); - - - - - - -LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty, - char *AsmString, size_t AsmStringSize, - char *Constraints, size_t ConstraintsSize, - LLVMBool HasSideEffects, LLVMBool IsAlignStack, - LLVMInlineAsmDialect Dialect); - - - - - - -LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M); - - - - -LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); - - - - - - -LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata(LLVMModuleRef M); - - - - - - -LLVMNamedMDNodeRef LLVMGetLastNamedMetadata(LLVMModuleRef M); - - - - - - - -LLVMNamedMDNodeRef LLVMGetNextNamedMetadata(LLVMNamedMDNodeRef NamedMDNode); - - - - - - - -LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NamedMDNode); - - - - - - - -LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M, - const char *Name, size_t NameLen); - - - - - - - -LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata(LLVMModuleRef M, - const char *Name, - size_t NameLen); - - - - - - -const char *LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NamedMD, - size_t *NameLen); - - - - - - -unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name); -# 942 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, - LLVMValueRef *Dest); - - - - - - - -void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, - LLVMValueRef Val); -# 962 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetDebugLocDirectory(LLVMValueRef Val, unsigned *Length); -# 972 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetDebugLocFilename(LLVMValueRef Val, unsigned *Length); -# 982 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetDebugLocLine(LLVMValueRef Val); - - - - - - - -unsigned LLVMGetDebugLocColumn(LLVMValueRef Val); - - - - - - -LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, - LLVMTypeRef FunctionTy); -# 1007 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name); - - - - - - -LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M); - - - - - - -LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M); - - - - - - - -LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn); - - - - - - - -LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn); - - -void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm); -# 1080 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty); -# 1089 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty); - - - - - - -LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); - - - - - - -void LLVMDumpType(LLVMTypeRef Val); - - - - - - - -char *LLVMPrintTypeToString(LLVMTypeRef Val); -# 1124 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits); - - - - - -LLVMTypeRef LLVMInt1Type(void); -LLVMTypeRef LLVMInt8Type(void); -LLVMTypeRef LLVMInt16Type(void); -LLVMTypeRef LLVMInt32Type(void); -LLVMTypeRef LLVMInt64Type(void); -LLVMTypeRef LLVMInt128Type(void); -LLVMTypeRef LLVMIntType(unsigned NumBits); -unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy); -# 1158 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C); - - - - - -LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C); - - - - - - -LLVMTypeRef LLVMHalfType(void); -LLVMTypeRef LLVMFloatType(void); -LLVMTypeRef LLVMDoubleType(void); -LLVMTypeRef LLVMX86FP80Type(void); -LLVMTypeRef LLVMFP128Type(void); -LLVMTypeRef LLVMPPCFP128Type(void); -# 1214 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, - LLVMTypeRef *ParamTypes, unsigned ParamCount, - LLVMBool IsVarArg); - - - - -LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); - - - - -LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy); - - - - -unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy); -# 1244 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest); -# 1268 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, - unsigned ElementCount, LLVMBool Packed); - - - - - - -LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, - LLVMBool Packed); - - - - - - -LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name); - - - - - - -const char *LLVMGetStructName(LLVMTypeRef Ty); - - - - - - -void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, - unsigned ElementCount, LLVMBool Packed); - - - - - - -unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy); -# 1318 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest); - - - - - - -LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned i); - - - - - - -LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy); - - - - - - -LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy); - - - - - - -LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy); -# 1368 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); - - - - - - -void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr); - - - - - - -unsigned LLVMGetNumContainedTypes(LLVMTypeRef Tp); -# 1392 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); -# 1401 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy); -# 1411 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace); -# 1420 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy); -# 1431 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); -# 1440 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy); -# 1455 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C); - - - - -LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C); - - - - - -LLVMTypeRef LLVMVoidType(void); -LLVMTypeRef LLVMLabelType(void); -LLVMTypeRef LLVMX86MMXType(void); -# 1611 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMTypeOf(LLVMValueRef Val); - - - - - - -LLVMValueKind LLVMGetValueKind(LLVMValueRef Val); - - - - - - -const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length); - - - - - - -void LLVMSetValueName2(LLVMValueRef Val, const char *Name, size_t NameLen); - - - - - - -void LLVMDumpValue(LLVMValueRef Val); - - - - - - - -char *LLVMPrintValueToString(LLVMValueRef Val); - - - - - - -void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal); - - - - -LLVMBool LLVMIsConstant(LLVMValueRef Val); - - - - -LLVMBool LLVMIsUndef(LLVMValueRef Val); -# 1679 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMIsAArgument(LLVMValueRef Val); LLVMValueRef LLVMIsABasicBlock(LLVMValueRef Val); LLVMValueRef LLVMIsAInlineAsm(LLVMValueRef Val); LLVMValueRef LLVMIsAUser(LLVMValueRef Val); LLVMValueRef LLVMIsAConstant(LLVMValueRef Val); LLVMValueRef LLVMIsABlockAddress(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantAggregateZero(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantArray(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantDataSequential(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantDataArray(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantDataVector(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantExpr(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantFP(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantInt(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantPointerNull(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantStruct(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantTokenNone(LLVMValueRef Val); LLVMValueRef LLVMIsAConstantVector(LLVMValueRef Val); LLVMValueRef LLVMIsAGlobalValue(LLVMValueRef Val); LLVMValueRef LLVMIsAGlobalAlias(LLVMValueRef Val); LLVMValueRef LLVMIsAGlobalIFunc(LLVMValueRef Val); LLVMValueRef LLVMIsAGlobalObject(LLVMValueRef Val); LLVMValueRef LLVMIsAFunction(LLVMValueRef Val); LLVMValueRef LLVMIsAGlobalVariable(LLVMValueRef Val); LLVMValueRef LLVMIsAUndefValue(LLVMValueRef Val); LLVMValueRef LLVMIsAInstruction(LLVMValueRef Val); LLVMValueRef LLVMIsABinaryOperator(LLVMValueRef Val); LLVMValueRef LLVMIsACallInst(LLVMValueRef Val); LLVMValueRef LLVMIsAIntrinsicInst(LLVMValueRef Val); LLVMValueRef LLVMIsADbgInfoIntrinsic(LLVMValueRef Val); LLVMValueRef LLVMIsADbgVariableIntrinsic(LLVMValueRef Val); LLVMValueRef LLVMIsADbgDeclareInst(LLVMValueRef Val); LLVMValueRef LLVMIsADbgLabelInst(LLVMValueRef Val); LLVMValueRef LLVMIsAMemIntrinsic(LLVMValueRef Val); LLVMValueRef LLVMIsAMemCpyInst(LLVMValueRef Val); LLVMValueRef LLVMIsAMemMoveInst(LLVMValueRef Val); LLVMValueRef LLVMIsAMemSetInst(LLVMValueRef Val); LLVMValueRef LLVMIsACmpInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFCmpInst(LLVMValueRef Val); LLVMValueRef LLVMIsAICmpInst(LLVMValueRef Val); LLVMValueRef LLVMIsAExtractElementInst(LLVMValueRef Val); LLVMValueRef LLVMIsAGetElementPtrInst(LLVMValueRef Val); LLVMValueRef LLVMIsAInsertElementInst(LLVMValueRef Val); LLVMValueRef LLVMIsAInsertValueInst(LLVMValueRef Val); LLVMValueRef LLVMIsALandingPadInst(LLVMValueRef Val); LLVMValueRef LLVMIsAPHINode(LLVMValueRef Val); LLVMValueRef LLVMIsASelectInst(LLVMValueRef Val); LLVMValueRef LLVMIsAShuffleVectorInst(LLVMValueRef Val); LLVMValueRef LLVMIsAStoreInst(LLVMValueRef Val); LLVMValueRef LLVMIsABranchInst(LLVMValueRef Val); LLVMValueRef LLVMIsAIndirectBrInst(LLVMValueRef Val); LLVMValueRef LLVMIsAInvokeInst(LLVMValueRef Val); LLVMValueRef LLVMIsAReturnInst(LLVMValueRef Val); LLVMValueRef LLVMIsASwitchInst(LLVMValueRef Val); LLVMValueRef LLVMIsAUnreachableInst(LLVMValueRef Val); LLVMValueRef LLVMIsAResumeInst(LLVMValueRef Val); LLVMValueRef LLVMIsACleanupReturnInst(LLVMValueRef Val); LLVMValueRef LLVMIsACatchReturnInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFuncletPadInst(LLVMValueRef Val); LLVMValueRef LLVMIsACatchPadInst(LLVMValueRef Val); LLVMValueRef LLVMIsACleanupPadInst(LLVMValueRef Val); LLVMValueRef LLVMIsAUnaryInstruction(LLVMValueRef Val); LLVMValueRef LLVMIsAAllocaInst(LLVMValueRef Val); LLVMValueRef LLVMIsACastInst(LLVMValueRef Val); LLVMValueRef LLVMIsAAddrSpaceCastInst(LLVMValueRef Val); LLVMValueRef LLVMIsABitCastInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFPExtInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFPToSIInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFPToUIInst(LLVMValueRef Val); LLVMValueRef LLVMIsAFPTruncInst(LLVMValueRef Val); LLVMValueRef LLVMIsAIntToPtrInst(LLVMValueRef Val); LLVMValueRef LLVMIsAPtrToIntInst(LLVMValueRef Val); LLVMValueRef LLVMIsASExtInst(LLVMValueRef Val); LLVMValueRef LLVMIsASIToFPInst(LLVMValueRef Val); LLVMValueRef LLVMIsATruncInst(LLVMValueRef Val); LLVMValueRef LLVMIsAUIToFPInst(LLVMValueRef Val); LLVMValueRef LLVMIsAZExtInst(LLVMValueRef Val); LLVMValueRef LLVMIsAExtractValueInst(LLVMValueRef Val); LLVMValueRef LLVMIsALoadInst(LLVMValueRef Val); LLVMValueRef LLVMIsAVAArgInst(LLVMValueRef Val); - -LLVMValueRef LLVMIsAMDNode(LLVMValueRef Val); -LLVMValueRef LLVMIsAMDString(LLVMValueRef Val); - - -const char *LLVMGetValueName(LLVMValueRef Val); - -void LLVMSetValueName(LLVMValueRef Val, const char *Name); -# 1716 "/usr/include/llvm-c/Core.h" 3 4 -LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val); - - - - - - - -LLVMUseRef LLVMGetNextUse(LLVMUseRef U); -# 1733 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetUser(LLVMUseRef U); - - - - - - -LLVMValueRef LLVMGetUsedValue(LLVMUseRef U); -# 1761 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); - - - - - - -LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index); - - - - - - -void LLVMSetOperand(LLVMValueRef User, unsigned Index, LLVMValueRef Val); - - - - - - -int LLVMGetNumOperands(LLVMValueRef Val); -# 1805 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstNull(LLVMTypeRef Ty); -# 1815 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty); - - - - - - -LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty); - - - - - - -LLVMBool LLVMIsNull(LLVMValueRef Val); - - - - - -LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty); -# 1864 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, - LLVMBool SignExtend); - - - - - - -LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy, - unsigned NumWords, - const uint64_t Words[]); -# 1885 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text, - uint8_t Radix); - - - - - - - -LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text, - unsigned SLen, uint8_t Radix); - - - - -LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N); - - - - - - - -LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text); - - - - -LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char *Text, - unsigned SLen); - - - - - - -unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal); - - - - - - -long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal); - - - - - - - -double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo); -# 1955 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, - unsigned Length, LLVMBool DontNullTerminate); -# 1967 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstString(const char *Str, unsigned Length, - LLVMBool DontNullTerminate); - - - - - - -LLVMBool LLVMIsConstantString(LLVMValueRef c); - - - - - - -const char *LLVMGetAsString(LLVMValueRef c, size_t *Length); - - - - - - -LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, - LLVMValueRef *ConstantVals, - unsigned Count, LLVMBool Packed); -# 2001 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, - LLVMBool Packed); - - - - - - -LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, - LLVMValueRef *ConstantVals, unsigned Length); - - - - - - -LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, - LLVMValueRef *ConstantVals, - unsigned Count); - - - - - - -LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx); - - - - - - -LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size); -# 2048 "/usr/include/llvm-c/Core.h" 3 4 -LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal); -LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty); -LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty); -LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstFNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstExactUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstURem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstAnd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstOr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstICmp(LLVMIntPredicate Predicate, - LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFCmp(LLVMRealPredicate Predicate, - LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstShl(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstLShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstAShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstGEP(LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, unsigned NumIndices); -LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, unsigned NumIndices); -LLVMValueRef LLVMConstInBoundsGEP(LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, - unsigned NumIndices); -LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, - unsigned NumIndices); -LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstZExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstUIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPToUI(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPToSI(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstZExtOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstSExtOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, - LLVMBool isSigned); -LLVMValueRef LLVMConstFPCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSelect(LLVMValueRef ConstantCondition, - LLVMValueRef ConstantIfTrue, - LLVMValueRef ConstantIfFalse); -LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, - LLVMValueRef IndexConstant); -LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant, - LLVMValueRef ElementValueConstant, - LLVMValueRef IndexConstant); -LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, - LLVMValueRef VectorBConstant, - LLVMValueRef MaskConstant); -LLVMValueRef LLVMConstExtractValue(LLVMValueRef AggConstant, unsigned *IdxList, - unsigned NumIdx); -LLVMValueRef LLVMConstInsertValue(LLVMValueRef AggConstant, - LLVMValueRef ElementValueConstant, - unsigned *IdxList, unsigned NumIdx); -LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB); - - -LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, - const char *AsmString, const char *Constraints, - LLVMBool HasSideEffects, LLVMBool IsAlignStack); -# 2158 "/usr/include/llvm-c/Core.h" 3 4 -LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); -LLVMBool LLVMIsDeclaration(LLVMValueRef Global); -LLVMLinkage LLVMGetLinkage(LLVMValueRef Global); -void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage); -const char *LLVMGetSection(LLVMValueRef Global); -void LLVMSetSection(LLVMValueRef Global, const char *Section); -LLVMVisibility LLVMGetVisibility(LLVMValueRef Global); -void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz); -LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global); -void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class); -LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global); -void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr); - - - - - - - -LLVMTypeRef LLVMGlobalGetValueType(LLVMValueRef Global); - - -LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global); - -void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr); -# 2198 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetAlignment(LLVMValueRef V); -# 2207 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes); - - - - - - - -void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind, - LLVMMetadataRef MD); - - - - - - -void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind); - - - - - - -void LLVMGlobalClearMetadata(LLVMValueRef Global); -# 2239 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueMetadataEntry *LLVMGlobalCopyAllMetadata(LLVMValueRef Value, - size_t *NumEntries); - - - - -void LLVMDisposeValueMetadataEntries(LLVMValueMetadataEntry *Entries); - - - - -unsigned LLVMValueMetadataEntriesGetKind(LLVMValueMetadataEntry *Entries, - unsigned Index); - - - - - -LLVMMetadataRef -LLVMValueMetadataEntriesGetMetadata(LLVMValueMetadataEntry *Entries, - unsigned Index); -# 2274 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty, - const char *Name, - unsigned AddressSpace); -LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name); -LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M); -LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M); -LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar); -LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar); -void LLVMDeleteGlobal(LLVMValueRef GlobalVar); -LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar); -void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal); -LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar); -void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal); -LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar); -void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant); -LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar); -void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode); -LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar); -void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit); -# 2308 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, - const char *Name); -# 2318 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M, - const char *Name, size_t NameLen); - - - - - - -LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M); - - - - - - -LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M); - - - - - - - -LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA); - - - - - - - -LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA); - - - - -LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias); - - - - -void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee); -# 2381 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMDeleteFunction(LLVMValueRef Fn); - - - - - - -LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn); - - - - - - -LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn); - - - - - - -void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn); - - - - - - -unsigned LLVMGetIntrinsicID(LLVMValueRef Fn); - - - - - - - -LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod, - unsigned ID, - LLVMTypeRef *ParamTypes, - size_t ParamCount); - - - - - - - -LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID, - LLVMTypeRef *ParamTypes, size_t ParamCount); - - - - - - -const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength); -# 2447 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMIntrinsicCopyOverloadedName(unsigned ID, - LLVMTypeRef *ParamTypes, - size_t ParamCount, - size_t *NameLength); - - - - - - -LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID); -# 2466 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn); -# 2476 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC); - - - - - - - -const char *LLVMGetGC(LLVMValueRef Fn); - - - - - - -void LLVMSetGC(LLVMValueRef Fn, const char *Name); - - - - - - -void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - LLVMAttributeRef A); -unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx); -void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - LLVMAttributeRef *Attrs); -LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F, - LLVMAttributeIndex Idx, - unsigned KindID); -LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F, - LLVMAttributeIndex Idx, - const char *K, unsigned KLen); -void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - unsigned KindID); -void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - const char *K, unsigned KLen); - - - - - -void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, - const char *V); -# 2537 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMCountParams(LLVMValueRef Fn); -# 2550 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params); -# 2559 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index); -# 2570 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst); - - - - - - -LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn); - - - - - - -LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn); -# 2593 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg); - - - - - - -LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg); - - - - - - - -void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align); -# 2641 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, - unsigned SLen); - - - - -LLVMValueRef LLVMMDString(const char *Str, unsigned SLen); - - - - - - -LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, - unsigned Count); - - - - -LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); - - - - -LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD); - - - - -LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val); -# 2679 "/usr/include/llvm-c/Core.h" 3 4 -const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length); - - - - - - - -unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V); -# 2700 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest); -# 2726 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB); - - - - -LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); - - - - -LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); - - - - -const char *LLVMGetBasicBlockName(LLVMBasicBlockRef BB); - - - - - - -LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB); -# 2760 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB); - - - - - - -unsigned LLVMCountBasicBlocks(LLVMValueRef Fn); -# 2777 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks); -# 2787 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn); - - - - - - -LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn); - - - - -LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB); - - - - -LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB); - - - - - - - -LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn); - - - - - - -LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C, - const char *Name); - - - - - - -LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C, - LLVMValueRef Fn, - const char *Name); - - - - - - - -LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef Fn, const char *Name); -# 2847 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBasicBlockRef LLVMInsertBasicBlockInContext(LLVMContextRef C, - LLVMBasicBlockRef BB, - const char *Name); - - - - - - -LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, - const char *Name); -# 2867 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB); -# 2877 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB); - - - - - - -void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); - - - - - - -void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); - - - - - - - -LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB); - - - - - - -LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); -# 2932 "/usr/include/llvm-c/Core.h" 3 4 -int LLVMHasMetadata(LLVMValueRef Val); - - - - -LLVMValueRef LLVMGetMetadata(LLVMValueRef Val, unsigned KindID); - - - - -void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID, LLVMValueRef Node); - - - - - - - -LLVMValueMetadataEntry * -LLVMInstructionGetAllMetadataOtherThanDebugLoc(LLVMValueRef Instr, - size_t *NumEntries); - - - - - - -LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); -# 2969 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst); - - - - - - - -LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst); -# 2987 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMInstructionRemoveFromParent(LLVMValueRef Inst); -# 2997 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMInstructionEraseFromParent(LLVMValueRef Inst); - - - - - - -LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst); -# 3014 "/usr/include/llvm-c/Core.h" 3 4 -LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst); -# 3024 "/usr/include/llvm-c/Core.h" 3 4 -LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst); -# 3034 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst); -# 3043 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst); -# 3065 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetNumArgOperands(LLVMValueRef Instr); -# 3076 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC); -# 3086 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr); - -void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, - unsigned Align); - -void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - LLVMAttributeRef A); -unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C, LLVMAttributeIndex Idx); -void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx, - LLVMAttributeRef *Attrs); -LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C, - LLVMAttributeIndex Idx, - unsigned KindID); -LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C, - LLVMAttributeIndex Idx, - const char *K, unsigned KLen); -void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - unsigned KindID); -void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - const char *K, unsigned KLen); - - - - - - -LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C); -# 3123 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr); -# 3132 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMIsTailCall(LLVMValueRef CallInst); -# 3141 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall); -# 3150 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst); -# 3162 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst); -# 3171 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); -# 3183 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); -# 3203 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetNumSuccessors(LLVMValueRef Term); - - - - - - -LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i); - - - - - - -void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block); -# 3226 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMIsConditional(LLVMValueRef Branch); -# 3235 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetCondition(LLVMValueRef Branch); -# 3244 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond); -# 3253 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr); -# 3271 "/usr/include/llvm-c/Core.h" 3 4 -LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca); -# 3289 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMIsInBounds(LLVMValueRef GEP); - - - - -void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds); -# 3312 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, - LLVMBasicBlockRef *IncomingBlocks, unsigned Count); - - - - -unsigned LLVMCountIncoming(LLVMValueRef PhiNode); - - - - -LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index); - - - - -LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index); -# 3348 "/usr/include/llvm-c/Core.h" 3 4 -unsigned LLVMGetNumIndices(LLVMValueRef Inst); - - - - -const unsigned *LLVMGetIndices(LLVMValueRef Inst); -# 3376 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C); -LLVMBuilderRef LLVMCreateBuilder(void); -void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block, - LLVMValueRef Instr); -void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr); -void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block); -LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder); -void LLVMClearInsertionPosition(LLVMBuilderRef Builder); -void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr); -void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, - const char *Name); -void LLVMDisposeBuilder(LLVMBuilderRef Builder); - - -void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L); -LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder); -void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst); - - -LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef); -LLVMValueRef LLVMBuildRet(LLVMBuilderRef, LLVMValueRef V); -LLVMValueRef LLVMBuildAggregateRet(LLVMBuilderRef, LLVMValueRef *RetVals, - unsigned N); -LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest); -LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef, LLVMValueRef If, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Else); -LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef, LLVMValueRef V, - LLVMBasicBlockRef Else, unsigned NumCases); -LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr, - unsigned NumDests); - - -LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, - const char *Name); -LLVMValueRef LLVMBuildInvoke2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, - const char *Name); -LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef); - - -LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn); -LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef PersFn, unsigned NumClauses, - const char *Name); -LLVMValueRef LLVMBuildCleanupRet(LLVMBuilderRef B, LLVMValueRef CatchPad, - LLVMBasicBlockRef BB); -LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad, - LLVMBasicBlockRef BB); -LLVMValueRef LLVMBuildCatchPad(LLVMBuilderRef B, LLVMValueRef ParentPad, - LLVMValueRef *Args, unsigned NumArgs, - const char *Name); -LLVMValueRef LLVMBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad, - LLVMValueRef *Args, unsigned NumArgs, - const char *Name); -LLVMValueRef LLVMBuildCatchSwitch(LLVMBuilderRef B, LLVMValueRef ParentPad, - LLVMBasicBlockRef UnwindBB, - unsigned NumHandlers, const char *Name); - - -void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, - LLVMBasicBlockRef Dest); - - -void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); - - -unsigned LLVMGetNumClauses(LLVMValueRef LandingPad); - - -LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx); - - -void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal); - - -LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad); - - -void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val); - - -void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest); - - -unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch); -# 3476 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers); - - - - -LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned i); - - -void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i, LLVMValueRef value); -# 3493 "/usr/include/llvm-c/Core.h" 3 4 -LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad); -# 3502 "/usr/include/llvm-c/Core.h" 3 4 -void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch); - - -LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name); -LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V, - const char *Name); -LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V, - const char *Name); -LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name); -LLVMValueRef LLVMBuildNot(LLVMBuilderRef, LLVMValueRef V, const char *Name); - - -LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, - LLVMValueRef Val, const char *Name); - - - - - - - -LLVMValueRef LLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr, - LLVMValueRef Val, LLVMValueRef Len, - unsigned Align); - - - - - -LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, - LLVMValueRef Dst, unsigned DstAlign, - LLVMValueRef Src, unsigned SrcAlign, - LLVMValueRef Size); - - - - - -LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B, - LLVMValueRef Dst, unsigned DstAlign, - LLVMValueRef Src, unsigned SrcAlign, - LLVMValueRef Size); - -LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, - LLVMValueRef Val, const char *Name); -LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal); - - -LLVMValueRef LLVMBuildLoad(LLVMBuilderRef, LLVMValueRef PointerVal, - const char *Name); -LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef, LLVMTypeRef Ty, - LLVMValueRef PointerVal, const char *Name); -LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr); - - -LLVMValueRef LLVMBuildGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - LLVMValueRef *Indices, unsigned NumIndices, - const char *Name); -LLVMValueRef LLVMBuildInBoundsGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - LLVMValueRef *Indices, unsigned NumIndices, - const char *Name); -LLVMValueRef LLVMBuildStructGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - unsigned Idx, const char *Name); -LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef Pointer, LLVMValueRef *Indices, - unsigned NumIndices, const char *Name); -LLVMValueRef LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef Pointer, LLVMValueRef *Indices, - unsigned NumIndices, const char *Name); -LLVMValueRef LLVMBuildStructGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef Pointer, unsigned Idx, - const char *Name); -LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str, - const char *Name); -LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str, - const char *Name); -LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst); -void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile); -LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst); -void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering); - - -LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, LLVMBool IsSigned, - const char *Name); -LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); - - -LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); - - -LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef, LLVMRealPredicate Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); - - -LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); - - -LLVMValueRef LLVMBuildCall(LLVMBuilderRef, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - const char *Name); -LLVMValueRef LLVMBuildCall2(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - const char *Name); -LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, - LLVMValueRef Then, LLVMValueRef Else, - const char *Name); -LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, - const char *Name); -LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, - LLVMValueRef Index, const char *Name); -LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, - LLVMValueRef EltVal, LLVMValueRef Index, - const char *Name); -LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef, LLVMValueRef V1, - LLVMValueRef V2, LLVMValueRef Mask, - const char *Name); -LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef, LLVMValueRef AggVal, - unsigned Index, const char *Name); -LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef, LLVMValueRef AggVal, - LLVMValueRef EltVal, unsigned Index, - const char *Name); - -LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef, LLVMValueRef Val, - const char *Name); -LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, - const char *Name); -LLVMValueRef LLVMBuildPtrDiff(LLVMBuilderRef, LLVMValueRef LHS, - LLVMValueRef RHS, const char *Name); -LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering ordering, - LLVMBool singleThread, const char *Name); -LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, - LLVMValueRef PTR, LLVMValueRef Val, - LLVMAtomicOrdering ordering, - LLVMBool singleThread); -LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, - LLVMValueRef Cmp, LLVMValueRef New, - LLVMAtomicOrdering SuccessOrdering, - LLVMAtomicOrdering FailureOrdering, - LLVMBool SingleThread); - -LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst); -void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread); - -LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst); -void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst, - LLVMAtomicOrdering Ordering); -LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst); -void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, - LLVMAtomicOrdering Ordering); -# 3766 "/usr/include/llvm-c/Core.h" 3 4 -LLVMModuleProviderRef -LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M); - - - - -void LLVMDisposeModuleProvider(LLVMModuleProviderRef M); -# 3784 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, - LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); -LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); -LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, - size_t InputDataLength, - const char *BufferName, - LLVMBool RequiresNullTerminator); -LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, - size_t InputDataLength, - const char *BufferName); -const char *LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf); -size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf); -void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf); -# 3812 "/usr/include/llvm-c/Core.h" 3 4 -LLVMPassRegistryRef LLVMGetGlobalPassRegistry(void); -# 3827 "/usr/include/llvm-c/Core.h" 3 4 -LLVMPassManagerRef LLVMCreatePassManager(void); - - - - - -LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M); - - -LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP); - - - - - -LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M); - - - - -LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM); - - - - - -LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F); - - - - -LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM); - - - - -void LLVMDisposePassManager(LLVMPassManagerRef PM); -# 3880 "/usr/include/llvm-c/Core.h" 3 4 -LLVMBool LLVMStartMultithreaded(void); - - - -void LLVMStopMultithreaded(void); - - - -LLVMBool LLVMIsMultithreaded(void); -# 5 "scope.h" 2 - - -# 6 "scope.h" -typedef struct scope_entry { - char *id; - LLVMValueRef value; - LLVMTypeRef type; - LLVMMetadataRef metadata; - struct scope_entry *prev; -} scope_entry; - -typedef struct scope_layer { - struct scope_entry *head; - struct scope_layer *prev; -} scope_layer; - -typedef scope_layer *scope; - -void scope_push_layer(scope *sc); -void scope_pop_layer(scope *sc); - -void scope_add_entry(scope sc, char *id, LLVMValueRef val, LLVMTypeRef type); -scope_entry *scope_find(scope sc, char *id); -# 5 "scope.c" 2 -# 1 "error.h" 1 - - - -# 1 "/usr/include/stdio.h" 1 3 4 -# 27 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/bits/libc-header-start.h" 1 3 4 -# 28 "/usr/include/stdio.h" 2 3 4 - - - - - -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stddef.h" 1 3 4 -# 34 "/usr/include/stdio.h" 2 3 4 - - -# 1 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdarg.h" 1 3 4 -# 40 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdarg.h" 3 4 - -# 40 "/usr/lib/gcc/x86_64-redhat-linux/9/include/stdarg.h" 3 4 -typedef __builtin_va_list __gnuc_va_list; -# 37 "/usr/include/stdio.h" 2 3 4 - - -# 1 "/usr/include/bits/types/__fpos_t.h" 1 3 4 - - - - -# 1 "/usr/include/bits/types/__mbstate_t.h" 1 3 4 -# 13 "/usr/include/bits/types/__mbstate_t.h" 3 4 -typedef struct -{ - int __count; - union - { - unsigned int __wch; - char __wchb[4]; - } __value; -} __mbstate_t; -# 6 "/usr/include/bits/types/__fpos_t.h" 2 3 4 - - - - -typedef struct _G_fpos_t -{ - __off_t __pos; - __mbstate_t __state; -} __fpos_t; -# 40 "/usr/include/stdio.h" 2 3 4 -# 1 "/usr/include/bits/types/__fpos64_t.h" 1 3 4 -# 10 "/usr/include/bits/types/__fpos64_t.h" 3 4 -typedef struct _G_fpos64_t -{ - __off64_t __pos; - __mbstate_t __state; -} __fpos64_t; -# 41 "/usr/include/stdio.h" 2 3 4 -# 1 "/usr/include/bits/types/__FILE.h" 1 3 4 - - - -struct _IO_FILE; -typedef struct _IO_FILE __FILE; -# 42 "/usr/include/stdio.h" 2 3 4 -# 1 "/usr/include/bits/types/FILE.h" 1 3 4 - - - -struct _IO_FILE; - - -typedef struct _IO_FILE FILE; -# 43 "/usr/include/stdio.h" 2 3 4 -# 1 "/usr/include/bits/types/struct_FILE.h" 1 3 4 -# 35 "/usr/include/bits/types/struct_FILE.h" 3 4 -struct _IO_FILE; -struct _IO_marker; -struct _IO_codecvt; -struct _IO_wide_data; - - - - -typedef void _IO_lock_t; - - - - - -struct _IO_FILE -{ - int _flags; - - - char *_IO_read_ptr; - char *_IO_read_end; - char *_IO_read_base; - char *_IO_write_base; - char *_IO_write_ptr; - char *_IO_write_end; - char *_IO_buf_base; - char *_IO_buf_end; - - - char *_IO_save_base; - char *_IO_backup_base; - char *_IO_save_end; - - struct _IO_marker *_markers; - - struct _IO_FILE *_chain; - - int _fileno; - int _flags2; - __off_t _old_offset; - - - unsigned short _cur_column; - signed char _vtable_offset; - char _shortbuf[1]; - - _IO_lock_t *_lock; - - - - - - - - __off64_t _offset; - - struct _IO_codecvt *_codecvt; - struct _IO_wide_data *_wide_data; - struct _IO_FILE *_freeres_list; - void *_freeres_buf; - size_t __pad5; - int _mode; - - char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; -}; -# 44 "/usr/include/stdio.h" 2 3 4 -# 52 "/usr/include/stdio.h" 3 4 -typedef __gnuc_va_list va_list; -# 84 "/usr/include/stdio.h" 3 4 -typedef __fpos_t fpos_t; -# 133 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 -# 134 "/usr/include/stdio.h" 2 3 4 - - - -extern FILE *stdin; -extern FILE *stdout; -extern FILE *stderr; - - - - - - -extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); - -extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int renameat (int __oldfd, const char *__old, int __newfd, - const char *__new) __attribute__ ((__nothrow__ , __leaf__)); -# 173 "/usr/include/stdio.h" 3 4 -extern FILE *tmpfile (void) ; -# 187 "/usr/include/stdio.h" 3 4 -extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ; - - - - -extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) ; -# 204 "/usr/include/stdio.h" 3 4 -extern char *tempnam (const char *__dir, const char *__pfx) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) ; - - - - - - - -extern int fclose (FILE *__stream); - - - - -extern int fflush (FILE *__stream); -# 227 "/usr/include/stdio.h" 3 4 -extern int fflush_unlocked (FILE *__stream); -# 246 "/usr/include/stdio.h" 3 4 -extern FILE *fopen (const char *__restrict __filename, - const char *__restrict __modes) ; - - - - -extern FILE *freopen (const char *__restrict __filename, - const char *__restrict __modes, - FILE *__restrict __stream) ; -# 279 "/usr/include/stdio.h" 3 4 -extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) ; -# 292 "/usr/include/stdio.h" 3 4 -extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) - __attribute__ ((__nothrow__ , __leaf__)) ; - - - - -extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) ; - - - - - -extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, - int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); - - - - -extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, - size_t __size) __attribute__ ((__nothrow__ , __leaf__)); - - -extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - - -extern int fprintf (FILE *__restrict __stream, - const char *__restrict __format, ...); - - - - -extern int printf (const char *__restrict __format, ...); - -extern int sprintf (char *__restrict __s, - const char *__restrict __format, ...) __attribute__ ((__nothrow__)); - - - - - -extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, - __gnuc_va_list __arg); - - - - -extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); - -extern int vsprintf (char *__restrict __s, const char *__restrict __format, - __gnuc_va_list __arg) __attribute__ ((__nothrow__)); - - - -extern int snprintf (char *__restrict __s, size_t __maxlen, - const char *__restrict __format, ...) - __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); - -extern int vsnprintf (char *__restrict __s, size_t __maxlen, - const char *__restrict __format, __gnuc_va_list __arg) - __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); -# 379 "/usr/include/stdio.h" 3 4 -extern int vdprintf (int __fd, const char *__restrict __fmt, - __gnuc_va_list __arg) - __attribute__ ((__format__ (__printf__, 2, 0))); -extern int dprintf (int __fd, const char *__restrict __fmt, ...) - __attribute__ ((__format__ (__printf__, 2, 3))); - - - - - - - -extern int fscanf (FILE *__restrict __stream, - const char *__restrict __format, ...) ; - - - - -extern int scanf (const char *__restrict __format, ...) ; - -extern int sscanf (const char *__restrict __s, - const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); - - - - - - -extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") - - ; -extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") - ; -extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__)) - - ; -# 432 "/usr/include/stdio.h" 3 4 -extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, - __gnuc_va_list __arg) - __attribute__ ((__format__ (__scanf__, 2, 0))) ; - - - - - -extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) - __attribute__ ((__format__ (__scanf__, 1, 0))) ; - - -extern int vsscanf (const char *__restrict __s, - const char *__restrict __format, __gnuc_va_list __arg) - __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); - - - - -extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") - - - - __attribute__ ((__format__ (__scanf__, 2, 0))) ; -extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") - - __attribute__ ((__format__ (__scanf__, 1, 0))) ; -extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__)) - - - - __attribute__ ((__format__ (__scanf__, 2, 0))); -# 485 "/usr/include/stdio.h" 3 4 -extern int fgetc (FILE *__stream); -extern int getc (FILE *__stream); - - - - - -extern int getchar (void); - - - - - - -extern int getc_unlocked (FILE *__stream); -extern int getchar_unlocked (void); -# 510 "/usr/include/stdio.h" 3 4 -extern int fgetc_unlocked (FILE *__stream); -# 521 "/usr/include/stdio.h" 3 4 -extern int fputc (int __c, FILE *__stream); -extern int putc (int __c, FILE *__stream); - - - - - -extern int putchar (int __c); -# 537 "/usr/include/stdio.h" 3 4 -extern int fputc_unlocked (int __c, FILE *__stream); - - - - - - - -extern int putc_unlocked (int __c, FILE *__stream); -extern int putchar_unlocked (int __c); - - - - - - -extern int getw (FILE *__stream); - - -extern int putw (int __w, FILE *__stream); - - - - - - - -extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) - ; -# 603 "/usr/include/stdio.h" 3 4 -extern __ssize_t __getdelim (char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream) ; -extern __ssize_t getdelim (char **__restrict __lineptr, - size_t *__restrict __n, int __delimiter, - FILE *__restrict __stream) ; - - - - - - - -extern __ssize_t getline (char **__restrict __lineptr, - size_t *__restrict __n, - FILE *__restrict __stream) ; - - - - - - - -extern int fputs (const char *__restrict __s, FILE *__restrict __stream); - - - - - -extern int puts (const char *__s); - - - - - - -extern int ungetc (int __c, FILE *__stream); - - - - - - -extern size_t fread (void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream) ; - - - - -extern size_t fwrite (const void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __s); -# 673 "/usr/include/stdio.h" 3 4 -extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream) ; -extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, - size_t __n, FILE *__restrict __stream); - - - - - - - -extern int fseek (FILE *__stream, long int __off, int __whence); - - - - -extern long int ftell (FILE *__stream) ; - - - - -extern void rewind (FILE *__stream); -# 707 "/usr/include/stdio.h" 3 4 -extern int fseeko (FILE *__stream, __off_t __off, int __whence); - - - - -extern __off_t ftello (FILE *__stream) ; -# 731 "/usr/include/stdio.h" 3 4 -extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); - - - - -extern int fsetpos (FILE *__stream, const fpos_t *__pos); -# 757 "/usr/include/stdio.h" 3 4 -extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); - -extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; - -extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; - - - -extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); -extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; -extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; - - - - - - - -extern void perror (const char *__s); - - - - - -# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 -# 26 "/usr/include/bits/sys_errlist.h" 3 4 -extern int sys_nerr; -extern const char *const sys_errlist[]; -# 782 "/usr/include/stdio.h" 2 3 4 - - - - -extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; - - - - -extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; -# 800 "/usr/include/stdio.h" 3 4 -extern FILE *popen (const char *__command, const char *__modes) ; - - - - - -extern int pclose (FILE *__stream); - - - - - -extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); -# 840 "/usr/include/stdio.h" 3 4 -extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); - - - -extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) ; - - -extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); -# 858 "/usr/include/stdio.h" 3 4 -extern int __uflow (FILE *); -extern int __overflow (FILE *, int); -# 873 "/usr/include/stdio.h" 3 4 - -# 5 "error.h" 2 - - - -# 7 "error.h" -enum errcode { - OK = 0, - GENERAL_ERROR = 1, - COMMAND_NOT_FOUND = 2, - UNKNOWN_ID, - SYNTAX_ERROR, - INVALID_ARGUMENTS -}; -# 6 "scope.c" 2 -# 1 "debug.h" 1 - - - - - -extern char verbose; -# 7 "scope.c" 2 -# 15 "scope.c" -void free_layer(scope_layer *layer); - -void free_layer(scope_layer *layer) { - for (scope_entry *entry = layer->head; entry;) { - scope_entry *x = entry; - entry = entry->prev; - free(x->id); - free(x); - } - - free(layer); -} - -void scope_push_layer(scope *sc) { - scope_layer *new_layer = malloc(sizeof (*new_layer)); - if (!new_layer) do { fprintf( -# 30 "scope.c" 3 4 - stderr -# 30 "scope.c" - , "cannot malloc?"); fprintf( -# 30 "scope.c" 3 4 - stderr -# 30 "scope.c" - , "\n"); exit(GENERAL_ERROR); } while (0); - - new_layer->prev = *sc; - new_layer->head = 0; - - *sc = new_layer; -} - -void scope_pop_layer(scope *sc) { - scope new_sc = (**sc).prev; - free_layer(*sc); - *sc = new_sc; -} - -void scope_add_entry(scope sc, char *id, LLVMValueRef val, LLVMTypeRef type) { - scope_entry *new_entry = malloc(sizeof (*new_entry)); - if (!new_entry) do { fprintf( - stderr - , "cannot malloc?"); fprintf( - stderr - , "\n"); exit(GENERAL_ERROR); } while (0); - - do { if (verbose) { fprintf( - stderr - , "adding entry for %s\n", id); } } while (0); - - new_entry->id = strdup(id); - new_entry->value = val; - new_entry->type = type; - - scope_layer *layer = sc; - new_entry->prev = layer->head; - layer->head = new_entry; -} - -scope_entry *scope_find(scope sc, char *id) { - for (scope_layer *layer = sc; layer; layer = layer->prev) { - for (scope_entry *entry = layer->head; entry; entry = entry->prev) { - if (!strcmp(entry->id, id)) { - return entry; - } - } - } - - return 0; -} @@ -17,7 +17,7 @@ typedef struct sexpr { union contents { double f; char *s; - int i; + unsigned i; struct node { struct sexpr *l; struct sexpr *r; @@ -19,8 +19,6 @@ static char *input_filename; static char *output_filename; static format_t format; -static boxing_rule_t boxing_rules; - extern FILE *yyin; int yyparse(void); @@ -66,14 +64,14 @@ sexpr *new_node(sexpr *l, sexpr *r, lloc_t lloc) { return new_sexpr(BRANCH, c, lloc); } -void prologue() { +void prologue(boxing_rule_t br, uint dbw) { switch (format) { case LLVM_INTERMEDIATE: case BITCODE: case INTERPRET: - llvm_codegen_prologue(input_filename, boxing_rules); + llvm_codegen_prologue(input_filename, br, dbw); break; case GRAPHVIZ: @@ -135,12 +133,13 @@ int main(int argc, char **argv) { output_filename = 0; format = LLVM_INTERMEDIATE; - boxing_rules = ALWAYS_BOX; + boxing_rule_t boxing_rules = ALWAYS_BOX; + uint default_bit_width = 0; verbose = 0; debug("\n"); - while ((c = getopt(argc, argv, "bghilo:qsu:v")) != -1) { + while ((c = getopt(argc, argv, "bghilo:qsu:vw:")) != -1) { switch (c) { case 'b': format = BITCODE; @@ -163,7 +162,8 @@ int main(int argc, char **argv) { "-q Quiet (default)\n" "-s Output S-expression description\n" "-u <rule> Set the boxing rule: always, never, or smart\n" -"-v Verbose\n", +"-v Verbose\n" +"-w <width> Specify default width of integers in bits\n", argv[0]); exit(0); @@ -208,6 +208,10 @@ int main(int argc, char **argv) { verbose = 1; break; + case 'w': + default_bit_width = atoi(optarg); + break; + case '?': switch (optopt) { case 'o': @@ -232,7 +236,7 @@ int main(int argc, char **argv) { yyin = fopen(input_filename, "r"); } - prologue(); + prologue(boxing_rules, default_bit_width); yyparse(); epilogue(output_filename, format); return 0; |
