OSDN Git Service

Speculative buildfix for Mac
authorHans Wennborg <hans@hanshq.net>
Wed, 20 Feb 2019 14:56:31 +0000 (14:56 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 20 Feb 2019 14:56:31 +0000 (14:56 +0000)
Our builds were failing with

FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o
[..]
In file included from /b/c/b/ToTMac/src/third_party/llvm/lib/Support/ARMBuildAttrs.cpp:9:
In file included from /b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/StringRef.h:12:
In file included from /b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/STLExtras.h:19:
/b/c/b/ToTMac/src/third_party/llvm/include/llvm/ADT/Optional.h:88:25: error: no member named 'addressof' in namespace 'std'
    ::new ((void *)std::addressof(value)) T(std::forward<Args>(args)...);
                   ~~~~~^

Try to fix by including <memory>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354472 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Optional.h

index ecddcc2..b45a740 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/type_traits.h"
 #include <cassert>
+#include <memory>
 #include <new>
 #include <utility>