gallivm: inline gallivm_init_llvm_targets
authorMarek Olšák <marek.olsak@amd.com>
Thu, 6 Jul 2017 00:15:35 +0000 (02:15 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 17 Jul 2017 14:50:39 +0000 (10:50 -0400)
there is only one user.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
src/gallium/auxiliary/gallivm/lp_bld_misc.h

index 0e4a53108972c4573f5752f6a57b072d90ec3beb..342cb386d63076e3dcd70d6f255be6bdbe1630b0 100644 (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"
index dafb4cfe06860fb82c3768fc81854d7250474e49..1b725d10d7ca5882492a7cc69eab94a24f04654f 100644 (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);