clang-3.5: fix build

Make Obj public in llvm's IntrusiveRefCntPtr

This fixes NixOs/nixpkgs#15974

It's not a nice fix, as it's really clang's problem. The proper fix
should modify clang's usage of IntrusiveRefCntPtr.
This commit is contained in:
Joe Hermaszewski 2016-06-04 13:24:11 +01:00
parent 70bf931498
commit c7281d14f7
3 changed files with 18 additions and 1 deletions

View File

@ -50,6 +50,5 @@ in stdenv.mkDerivation {
homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.all;
broken = true;
};
}

View File

@ -0,0 +1,15 @@
diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
index f9df378..9d860ec 100644
--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -134,9 +134,9 @@ public:
//===----------------------------------------------------------------------===//
template <typename T>
class IntrusiveRefCntPtr {
+ public:
T* Obj;
- public:
typedef T element_type;
explicit IntrusiveRefCntPtr() : Obj(nullptr) {}

View File

@ -53,6 +53,8 @@ in stdenv.mkDerivation rec {
"-DCAN_TARGET_i386=false"
];
patches = [ ./fix-15974.patch ];
postBuild = ''
rm -fR $out
@ -75,3 +77,4 @@ in stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.all;
};
}