]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/patches/patch-14-llvm-r216571-dynamiclib-usability.diff
Merge xz 5.2.0.
[FreeBSD/FreeBSD.git] / contrib / llvm / patches / patch-14-llvm-r216571-dynamiclib-usability.diff
1 Pull in r216571 from upstream llvm trunk (by Zachary Turner):
2
3   Fix some semantic usability issues with DynamicLibrary.
4
5   This patch allows invalid DynamicLibrary instances to be
6   constructed, and fixes the const-correctness of the isValid()
7   method.
8
9   No functional change.
10
11 This is needed for supporting the upgrade to a newer LLDB snapshot.
12
13 Introduced here: http://svnweb.freebsd.org/changeset/base/275153
14
15 Index: include/llvm/Support/DynamicLibrary.h
16 ===================================================================
17 --- include/llvm/Support/DynamicLibrary.h
18 +++ include/llvm/Support/DynamicLibrary.h
19 @@ -43,10 +43,11 @@ namespace sys {
20      // Opaque data used to interface with OS-specific dynamic library handling.
21      void *Data;
22  
23 +  public:
24      explicit DynamicLibrary(void *data = &Invalid) : Data(data) {}
25 -  public:
26 +
27      /// Returns true if the object refers to a valid library.
28 -    bool isValid() { return Data != &Invalid; }
29 +    bool isValid() const { return Data != &Invalid; }
30  
31      /// Searches through the library for the symbol \p symbolName. If it is
32      /// found, the address of that symbol is returned. If not, NULL is returned.