diff options
author | Roland Scheidegger <[email protected]> | 2014-05-16 01:00:53 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-05-16 22:50:14 +0200 |
commit | 26cac02c51db0f49f6c67d3cd029ce044a087473 (patch) | |
tree | 7b6d73ec23ee447239a30cf5385ff9ae6e0b8b42 /src/gallium/auxiliary/gallivm | |
parent | ef6b6658f91bd5871739bdb71a08042f26abe389 (diff) |
gallivm: give more verbose names to modules
When we had just one module "gallivm" was an appropriate name. But now we have
modules containing all functions for a particular variant, so give it a
corresponding name (this is really just for helping debugging).
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 9 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.h | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 83ffad9a838..7aebebb12d3 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -284,7 +284,7 @@ fail: * \return TRUE for success, FALSE for failure */ static boolean -init_gallivm_state(struct gallivm_state *gallivm) +init_gallivm_state(struct gallivm_state *gallivm, const char *name) { assert(!gallivm->context); assert(!gallivm->module); @@ -299,7 +299,7 @@ init_gallivm_state(struct gallivm_state *gallivm) if (!gallivm->context) goto fail; - gallivm->module = LLVMModuleCreateWithNameInContext("gallivm", + gallivm->module = LLVMModuleCreateWithNameInContext(name, gallivm->context); if (!gallivm->module) goto fail; @@ -466,16 +466,15 @@ lp_build_init(void) /** * Create a new gallivm_state object. - * Note that we return a singleton. */ struct gallivm_state * -gallivm_create(void) +gallivm_create(const char *name) { struct gallivm_state *gallivm; gallivm = CALLOC_STRUCT(gallivm_state); if (gallivm) { - if (!init_gallivm_state(gallivm)) { + if (!init_gallivm_state(gallivm, name)) { FREE(gallivm); gallivm = NULL; } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index 464bb832929..2e32cf8b077 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -54,7 +54,7 @@ lp_build_init(void); struct gallivm_state * -gallivm_create(void); +gallivm_create(const char *name); void gallivm_destroy(struct gallivm_state *gallivm); |