[PATCH] D18460: 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:31 PDT 2016


dim created this revision.
dim added reviewers: joker.eph, chandlerc.
dim added subscribers: llvm-commits, bdrewery.

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.

http://reviews.llvm.org/D18460

Files:
  include/llvm/Support/ThreadPool.h

Index: include/llvm/Support/ThreadPool.h
===================================================================
--- include/llvm/Support/ThreadPool.h
+++ include/llvm/Support/ThreadPool.h
@@ -33,6 +33,7 @@
 #pragma warning(pop)
 #endif
 
+#include <atomic>
 #include <condition_variable>
 #include <functional>
 #include <memory>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18460.51597.patch
Type: text/x-patch
Size: 327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160324/ec426afb/attachment.bin>


More information about the llvm-commits mailing list