================
Comment at: src/cxa_exception_storage.cpp:48
@@ +47,3 @@
+#if LIBCXXABI_SINGLE_THREADED
+    __cxa_eh_globals * eh_globals_ = NULL;
+#else
----------------
Why is eh_globals_ being allocated with calloc() in the single threaded case?

This would be much simpler to have a block (like the #if HAS_THREAD_LOCAL) that 
just has:

  #elif LIBCXXABI_SINGLE_THREADED
     static __cxa_eh_globals eh_globals;
     __cxa_eh_globals *_cxa_get_globals() { return &eh_globals; }
     __cxa_eh_globals *_cxa_get_globals_fast() { return &eh_globals; }
   #else

and the rest of the file stays the same.

http://reviews.llvm.org/D3386



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to