[PATCH] [libcxxabi] Refactor building and testing libc++abi without threads

Jonathan Roelofs jonathan at codesourcery.com
Mon Nov 24 14:29:20 PST 2014


Looks ok to me.

================
Comment at: test/test_exception_storage.cpp:59-62
@@ -58,3 +58,6 @@
     size_t thread_globals;
-    retVal = thread_code(&thread_globals) != 0;
+    // Check that __cxa_get_globals() is not NULL.
+    if (thread_code(&thread_globals) == 0) {
+        retVal = 1;
+    }
 #else
----------------
EricWF wrote:
> `__cxa_get_globals()` never returns null even when `LIBCXXABI_HAS_NO_THREADS` is defined. So I think the old expected result is wrong.
Yeah, that should have been '==' not '!='. Oops. I think I remember fixing this locally, but I guess I didn't upstream it.

And yeah, this test is pretty much pointless when doing single-threaded stuff.

http://reviews.llvm.org/D6393






More information about the cfe-commits mailing list