summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-08-25 19:54:53 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-08-25 19:54:53 +0000
commit51e6f68b4713648d16245a5292fc3c86db69e272 (patch)
treebb59c068494973bb016a177d127212716115a97a /llvm/lib/System/DynamicLibrary.cpp
parent92206f940454edae755972aafa57d5258c4029c6 (diff)
downloadbcm5719-llvm-51e6f68b4713648d16245a5292fc3c86db69e272.tar.gz
bcm5719-llvm-51e6f68b4713648d16245a5292fc3c86db69e272.zip
For PR797:
Final commit for this bug. This removes the last EH holdouts in LLVM and turns off exception support by using the -fno-exceptions option. This leads to the following reduction in library and executable sizes: DEBUG BUILD RELEASE BUILD before after delta before after delta lib 162,328K 157,616K 4,712 17,864K 16,416K 1,448K bin 571,444K 557,156K 14,288 63,296K 56,996K 6,300K Debug Improvement: 19,000K (2.59%) Release Improvement: 7,748K (9.55%) llvm-svn: 29882
Diffstat (limited to 'llvm/lib/System/DynamicLibrary.cpp')
-rw-r--r--llvm/lib/System/DynamicLibrary.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/System/DynamicLibrary.cpp b/llvm/lib/System/DynamicLibrary.cpp
index 859092a52af..08b7a88cbb3 100644
--- a/llvm/lib/System/DynamicLibrary.cpp
+++ b/llvm/lib/System/DynamicLibrary.cpp
@@ -45,12 +45,10 @@ using namespace llvm::sys;
//=== independent code.
//===----------------------------------------------------------------------===//
-static bool did_initialize_ltdl = false;
-
static inline void check_ltdl_initialization() {
+ static bool did_initialize_ltdl = false;
if (!did_initialize_ltdl) {
- if (0 != lt_dlinit())
- throw std::string(lt_dlerror());
+ assert(0 == lt_dlinit() || "Can't init the ltdl library");
did_initialize_ltdl = true;
}
}
@@ -62,13 +60,13 @@ DynamicLibrary::DynamicLibrary() : handle(0) {
lt_dlhandle a_handle = lt_dlopen(0);
- if (a_handle == 0)
- throw std::string("Can't open program as dynamic library");
+ assert(a_handle == 0 || "Can't open program as dynamic library");
handle = a_handle;
OpenedHandles.push_back(a_handle);
}
+/*
DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) {
check_ltdl_initialization();
@@ -83,6 +81,7 @@ DynamicLibrary::DynamicLibrary(const char*filename) : handle(0) {
handle = a_handle;
OpenedHandles.push_back(a_handle);
}
+*/
DynamicLibrary::~DynamicLibrary() {
lt_dlhandle a_handle = (lt_dlhandle) handle;
OpenPOWER on IntegriCloud