summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-26 23:57:12 +0000
committerdim <dim@FreeBSD.org>2014-11-26 23:57:12 +0000
commit226a2bb6bfbe23e6d7982d86aacac4e7231b17e3 (patch)
treef33a81d626f8a53491483073c25996af4bd0c57a /contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff
parent753d443c1dc50e80af49211cd19d9b4098dca502 (diff)
downloadFreeBSD-src-226a2bb6bfbe23e6d7982d86aacac4e7231b17e3.zip
FreeBSD-src-226a2bb6bfbe23e6d7982d86aacac4e7231b17e3.tar.gz
Add patch files for r275152, r275153 and r275154.
Diffstat (limited to 'contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff')
-rw-r--r--contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff32
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff b/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff
new file mode 100644
index 0000000..7b68af4
--- /dev/null
+++ b/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff
@@ -0,0 +1,32 @@
+Pull in r216571 from upstream llvm trunk (by Zachary Turner):
+
+ Fix some semantic usability issues with DynamicLibrary.
+
+ This patch allows invalid DynamicLibrary instances to be
+ constructed, and fixes the const-correctness of the isValid()
+ method.
+
+ No functional change.
+
+This is needed for supporting the upgrade to a newer LLDB snapshot.
+
+Introduced here: http://svnweb.freebsd.org/changeset/base/275153
+
+Index: include/llvm/Support/DynamicLibrary.h
+===================================================================
+--- include/llvm/Support/DynamicLibrary.h (revision 15)
++++ include/llvm/Support/DynamicLibrary.h (revision 16)
+@@ -43,10 +43,11 @@ namespace sys {
+ // Opaque data used to interface with OS-specific dynamic library handling.
+ void *Data;
+
++ public:
+ explicit DynamicLibrary(void *data = &Invalid) : Data(data) {}
+- public:
++
+ /// Returns true if the object refers to a valid library.
+- bool isValid() { return Data != &Invalid; }
++ bool isValid() const { return Data != &Invalid; }
+
+ /// Searches through the library for the symbol \p symbolName. If it is
+ /// found, the address of that symbol is returned. If not, NULL is returned.
OpenPOWER on IntegriCloud