diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-11-29 10:38:54 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-11-29 10:38:54 +0000 |
commit | 7a9369065d1ab22e32af65bd505ce5bc45a2216c (patch) | |
tree | 2bcc21972f0198fea911eaf05e2d08bd6fe36c3a /include/llvm/System/DynamicLibrary.h | |
parent | 6f14a5b486b0f41c36b703807f2abee9d34c62a5 (diff) |
Make the default constructor cause the program's symbols to be loaded as
if it was a dynamic library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/DynamicLibrary.h')
-rw-r--r-- | include/llvm/System/DynamicLibrary.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/llvm/System/DynamicLibrary.h b/include/llvm/System/DynamicLibrary.h index 29ee9a8ffe..d8535284eb 100644 --- a/include/llvm/System/DynamicLibrary.h +++ b/include/llvm/System/DynamicLibrary.h @@ -32,10 +32,19 @@ namespace sys { /// @name Constructors /// @{ public: + /// Construct a DynamicLibrary that represents the currently executing + /// program. The program must have been linked with -export-dynamic or + /// -dlopen self for this to work. Any symbols retrieved with the + /// GetAddressOfSymbol function will refer to the program not to any + /// library. + /// @throws std::string indicating why the program couldn't be opened. + /// @brief Open program as dynamic library. + DynamicLibrary(); + /// This is the constructor for DynamicLibrary instances. It will open /// the dynamic library specified by the \filename Path. /// @throws std::string indicating why the library couldn't be opened. - /// @brief DynamicLibrary constructor + /// @brief Open a dynamic library. DynamicLibrary(const char* filename); /// After destruction, the symbols of the library will no longer be @@ -68,7 +77,6 @@ namespace sys { protected: void* handle; // Opaque handle for information about the library - DynamicLibrary(); ///< Do not implement DynamicLibrary(const DynamicLibrary&); ///< Do not implement DynamicLibrary& operator=(const DynamicLibrary&); ///< Do not implement /// @} |