1 Pull in r216571 from upstream llvm trunk (by Zachary Turner):
3 Fix some semantic usability issues with DynamicLibrary.
5 This patch allows invalid DynamicLibrary instances to be
6 constructed, and fixes the const-correctness of the isValid()
11 This is needed for supporting the upgrade to a newer LLDB snapshot.
13 Introduced here: http://svnweb.freebsd.org/changeset/base/275153
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.
24 explicit DynamicLibrary(void *data = &Invalid) : Data(data) {}
27 /// Returns true if the object refers to a valid library.
28 - bool isValid() { return Data != &Invalid; }
29 + bool isValid() const { return Data != &Invalid; }
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.