Nice, LGTM. Clang now compiles __thread variables correctly on Windows for me. C++11 thread_local and __declpsec(thread) need more work though. http://reviews.llvm.org/D3421