From fdcdbe7285bba98b5354efeeac81031d43615db8 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 1 Sep 2023 10:03:51 -0700 Subject: [PATCH] LLVMSupport: partially backport 6613f4aff85b24a13d4f5f7e9cd24bf3f44037a3 This partially backports the API changes from 6613f4aff85b24a13d4f5f7e9cd24bf3f44037a3 to accommodate the plugin loading support for Swift Macros. --- llvm/include/llvm/Support/DynamicLibrary.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/include/llvm/Support/DynamicLibrary.h b/llvm/include/llvm/Support/DynamicLibrary.h index 0771606a75f56..6e4022f8dac26 100644 --- a/llvm/include/llvm/Support/DynamicLibrary.h +++ b/llvm/include/llvm/Support/DynamicLibrary.h @@ -45,6 +45,9 @@ class DynamicLibrary { /// Returns true if the object refers to a valid library. bool isValid() const { return Data != &Invalid; } + /// Return the OS specific handle value. + void *getOSSpecificHandle() const { return Data; } + /// 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. /// Note that NULL will also be returned if the library failed to load.