diff options
author | Jose Fonseca <[email protected]> | 2016-04-19 12:07:16 +0100 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2016-04-19 12:10:02 +0100 |
commit | 524042fa35d3182227e81baeb295f4cb2ee73530 (patch) | |
tree | 79af764c4cf68adfb5005e7b880a765aa236fed0 /src/gallium/drivers/llvmpipe/lp_test_arit.c | |
parent | bb9e8c5090f0826dcf24368f3017c784f45cfac8 (diff) |
llvmpipe: Avoid LLVMGetGlobalContext in tests.
Trivial.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_arit.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_arit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_arit.c b/src/gallium/drivers/llvmpipe/lp_test_arit.c index f0582ff83e1..875d51c5a38 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_arit.c +++ b/src/gallium/drivers/llvmpipe/lp_test_arit.c @@ -400,6 +400,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned { char test_name[128]; util_snprintf(test_name, sizeof test_name, "%s.v%u", test->name, length); + LLVMContextRef context; struct gallivm_state *gallivm; LLVMValueRef test_func; unary_func_t test_func_jit; @@ -415,7 +416,8 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned in[i] = 1.0; } - gallivm = gallivm_create("test_module", LLVMGetGlobalContext()); + context = LLVMContextCreate(); + gallivm = gallivm_create("test_module", context); test_func = build_unary_test_func(gallivm, test, length, test_name); @@ -486,6 +488,7 @@ test_unary(unsigned verbose, FILE *fp, const struct unary_test_t *test, unsigned } gallivm_destroy(gallivm); + LLVMContextDispose(context); align_free(in); align_free(out); |