[llvm-commits] CVS: llvm/lib/System/Win32/DynamicLibrary.inc
Chris Lattner
lattner at cs.uiuc.edu
Fri Jul 7 10:12:48 PDT 2006
Changes in directory llvm/lib/System/Win32:
DynamicLibrary.inc updated: 1.15 -> 1.16
---
Log message:
Change LoadLibraryPermanently to not throw an exception.
---
Diffs of the changes: (+4 -2)
DynamicLibrary.inc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Index: llvm/lib/System/Win32/DynamicLibrary.inc
diff -u llvm/lib/System/Win32/DynamicLibrary.inc:1.15 llvm/lib/System/Win32/DynamicLibrary.inc:1.16
--- llvm/lib/System/Win32/DynamicLibrary.inc:1.15 Thu Jun 1 14:03:21 2006
+++ llvm/lib/System/Win32/DynamicLibrary.inc Fri Jul 7 12:12:36 2006
@@ -94,12 +94,13 @@
}
}
-void DynamicLibrary::LoadLibraryPermanently(const char* filename) {
+bool DynamicLibrary::LoadLibraryPermanently(const char *filename,
+ std::string *ErrMsg) {
if (filename) {
HMODULE a_handle = LoadLibrary(filename);
if (a_handle == 0)
- ThrowError(std::string(filename) + ": Can't open : ");
+ return GetError(std::string(filename) + ": Can't open : ", ErrMsg);
OpenedHandles.push_back(a_handle);
} else {
@@ -110,6 +111,7 @@
// Because we don't remember the handle, we will never free it; hence,
// it is loaded permanently.
+ return false;
}
void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
More information about the llvm-commits
mailing list