[llvm] r264335 - Add <atomic> to ThreadPool.h, since std::atomic is used

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 13:39:17 PDT 2016


Author: dim
Date: Thu Mar 24 15:39:17 2016
New Revision: 264335

URL: http://llvm.org/viewvc/llvm-project?rev=264335&view=rev
Log:
Add <atomic> to ThreadPool.h, since std::atomic is used

Summary:
Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
headers is such that it gets an error about std::atomic<> use in
ThreadPool.h, since this header is not included explicitly.  See also:

https://llvm.org/bugs/show_bug.cgi?id=27058

Fix this by including <atomic>.  Patch by Bryan Drewery.

Reviewers: chandlerc, joker.eph

Subscribers: bdrewery, llvm-commits

Differential Revision: http://reviews.llvm.org/D18460

Modified:
    llvm/trunk/include/llvm/Support/ThreadPool.h

Modified: llvm/trunk/include/llvm/Support/ThreadPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ThreadPool.h?rev=264335&r1=264334&r2=264335&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/ThreadPool.h (original)
+++ llvm/trunk/include/llvm/Support/ThreadPool.h Thu Mar 24 15:39:17 2016
@@ -33,6 +33,7 @@
 #pragma warning(pop)
 #endif
 
+#include <atomic>
 #include <condition_variable>
 #include <functional>
 #include <memory>




More information about the llvm-commits mailing list