gallivm: inline gallivm_init_llvm_targets

there is only one user.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák 2017-07-06 02:15:35 +02:00
parent ece0c0439f
commit c351037d6c
2 changed files with 8 additions and 18 deletions

View file

@ -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"

View file

@ -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);