Fix build on recent HEAD.

PR:		217236
Submitted by:	dim
This commit is contained in:
Brooks Davis 2017-02-22 00:49:41 +00:00
parent 7580c94a58
commit c71bcdbc78
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=434557
3 changed files with 42 additions and 4 deletions

View file

@ -0,0 +1,21 @@
$FreeBSD$
------------------------------------------------------------------------
r218295 | akirtzidis | 2014-09-23 08:06:43 +0200 (Tue, 23 Sep 2014) | 2 lines
[ADT/IntrusiveRefCntPtr] Give friend access to IntrusiveRefCntPtr<X> so the relevant move constructor can access 'Obj'.
------------------------------------------------------------------------
Index: include/llvm/ADT/IntrusiveRefCntPtr.h
===================================================================
--- include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218294)
+++ include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218295)
@@ -197,6 +197,9 @@ public:
private:
void retain() { if (Obj) IntrusiveRefCntPtrInfo<T>::retain(Obj); }
void release() { if (Obj) IntrusiveRefCntPtrInfo<T>::release(Obj); }
+
+ template <typename X>
+ friend class IntrusiveRefCntPtr;
};
template<class T, class U>

View file

@ -85,10 +85,6 @@ RELTYPE= Release
.include <bsd.port.pre.mk>
.if ${OPSYS} == "FreeBSD" && ${OSVERSION} >= 1200017 && ${CHOSEN_COMPILER_TYPE} == "clang"
BROKEN= Base clang produces compiler errors
.endif
# keep in sync with /usr/src/lib/clang/clang.build.mk
CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/:C/armv6hf/armv6/}-portbld-${OPSYS:tl}${OSREL}

View file

@ -0,0 +1,21 @@
$FreeBSD$
------------------------------------------------------------------------
r218295 | akirtzidis | 2014-09-23 08:06:43 +0200 (Tue, 23 Sep 2014) | 2 lines
[ADT/IntrusiveRefCntPtr] Give friend access to IntrusiveRefCntPtr<X> so the relevant move constructor can access 'Obj'.
------------------------------------------------------------------------
Index: include/llvm/ADT/IntrusiveRefCntPtr.h
===================================================================
--- include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218294)
+++ include/llvm/ADT/IntrusiveRefCntPtr.h (revision 218295)
@@ -197,6 +197,9 @@ public:
private:
void retain() { if (Obj) IntrusiveRefCntPtrInfo<T>::retain(Obj); }
void release() { if (Obj) IntrusiveRefCntPtrInfo<T>::release(Obj); }
+
+ template <typename X>
+ friend class IntrusiveRefCntPtr;
};
template<class T, class U>