[PATCH] D22439: Add missing includes.
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 16 12:44:31 PDT 2016
v.g.vassilev created this revision.
v.g.vassilev added a reviewer: rsmith.
v.g.vassilev added a subscriber: cfe-commits.
I am not sure if we should #include <atomic> but the instantiation of `operator*` of `ManagedStatic` needs `std::memory_order_aquire`. Modules builds error out with:
`In module 'LLVM_Utils' imported from /home/vvassilev/workspace/llvm-git/src/lib/Support/CommandLine.cpp:19:
/home/vvassilev/workspace/llvm-git/src/include/llvm/Support/ManagedStatic.h:66:26: error:
definition of 'memory_order' must be imported from module
'LLVM_Utils.ADT.IntrusiveRefCntPtr' before it is required
void *Tmp = Ptr.load(std::memory_order_acquire);
^
/home/vvassilev/workspace/llvm-git/src/include/llvm/Support/ManagedStatic.h:73:29: note:
in instantiation of member function 'llvm::ManagedStatic<(anonymous
namespace)::CommandLineParser>::operator*' requested here
C *operator->() { return &**this; }
^
/home/vvassilev/workspace/llvm-git/src/lib/Support/CommandLine.cpp:339:15: note:
in instantiation of member function 'llvm::ManagedStatic<(anonymous
namespace)::CommandLineParser>::operator->' requested here
GlobalParser->addLiteralOption(O, Name);
^
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/atomic_base.h:56:16: note:
previous definition is here
typedef enum memory_order
^
1 error generated.
`
https://reviews.llvm.org/D22439
Files:
lib/Support/APInt.cpp
lib/Support/CachePruning.cpp
lib/Support/CommandLine.cpp
lib/Support/CrashRecoveryContext.cpp
lib/Support/Debug.cpp
lib/Support/DeltaAlgorithm.cpp
lib/Support/Error.cpp
lib/Support/ErrorHandling.cpp
lib/Support/LockFileManager.cpp
lib/Support/ManagedStatic.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22439.64230.patch
Type: text/x-patch
Size: 3713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160716/37bd56e5/attachment.bin>
More information about the cfe-commits
mailing list