[PATCH] D52251: [builtins] Add __emutls_unregister_key function

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 18 16:22:43 PDT 2018


chh added inline comments.


================
Comment at: lib/builtins/emutls.c:394
+
+#ifdef __BIONIC__
+__attribute__((visibility("hidden")))
----------------
I think this function should be useful to other non-bionic platform too.
Did you get any link error with compiler-rt tests?



================
Comment at: lib/builtins/emutls.c:397
+void __emutls_unregister_key(void) {
+    pthread_key_delete(emutls_pthread_key);
+}
----------------
Shouldn't this be called only after the pthread key was created?
gcc's version has a flag emutls_key_created set only after emutls_init.




Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D52251





More information about the llvm-commits mailing list