diff options
author | Marek Olšák <[email protected]> | 2017-07-06 02:15:35 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-07-17 10:50:39 -0400 |
commit | c351037d6c097427a7f80da8a86e42c224c2f260 (patch) | |
tree | fced30b0824072085092822264a410d503bf094f /src/gallium | |
parent | ece0c0439f61f1e460349113a4490807e9939071 (diff) |
gallivm: inline gallivm_init_llvm_targets
there is only one user.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 23 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.h | 3 |
2 files changed, 8 insertions, 18 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index 0e4a5310897..342cb386d63 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -124,20 +124,6 @@ static void init_native_targets() llvm::InitializeNativeTargetDisassembler(); } -/** - * The llvm target registry is not thread-safe, so drivers and state-trackers - * that want to initialize targets should use the gallivm_init_llvm_targets() - * function to safely initialize targets. - * - * LLVM targets should be initialized before the driver or state-tracker tries - * to access the registry. - */ -extern "C" void -gallivm_init_llvm_targets(void) -{ - call_once(&init_native_targets_once_flag, init_native_targets); -} - extern "C" void lp_set_target_options(void) { @@ -150,7 +136,14 @@ lp_set_target_options(void) llvm::DisablePrettyStackTrace = true; #endif - gallivm_init_llvm_targets(); + /* The llvm target registry is not thread-safe, so drivers and state-trackers + * that want to initialize targets should use the lp_set_target_options() + * function to safely initialize targets. + * + * LLVM targets should be initialized before the driver or state-tracker tries + * to access the registry. + */ + call_once(&init_native_targets_once_flag, init_native_targets); } extern "C" diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/src/gallium/auxiliary/gallivm/lp_bld_misc.h index dafb4cfe068..1b725d10d7c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.h @@ -42,9 +42,6 @@ extern "C" { struct lp_generated_code; -extern void -gallivm_init_llvm_targets(void); - extern LLVMTargetLibraryInfoRef gallivm_create_target_library_info(const char *triple); |