Changes in directory llvm/lib/System:
DynamicLibrary.cpp updated: 1.16 -> 1.17 README.txt updated: 1.6 -> 1.7 --- Log message: For PR797: http://llvm.org/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%) --- Diffs of the changes: (+7 -8) DynamicLibrary.cpp | 11 +++++------ README.txt | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.16 llvm/lib/System/DynamicLibrary.cpp:1.17 --- llvm/lib/System/DynamicLibrary.cpp:1.16 Wed Jul 26 11:55:39 2006 +++ llvm/lib/System/DynamicLibrary.cpp Fri Aug 25 14:54:53 2006 @@ -45,12 +45,10 @@ //=== 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 @@ 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 @@ handle = a_handle; OpenedHandles.push_back(a_handle); } +*/ DynamicLibrary::~DynamicLibrary() { lt_dlhandle a_handle = (lt_dlhandle) handle; Index: llvm/lib/System/README.txt diff -u llvm/lib/System/README.txt:1.6 llvm/lib/System/README.txt:1.7 --- llvm/lib/System/README.txt:1.6 Mon Mar 13 23:54:51 2006 +++ llvm/lib/System/README.txt Fri Aug 25 14:54:53 2006 @@ -25,8 +25,8 @@ 3. No exposed system-specific functions. 4. No exposed system-specific data. 5. Data in lib/System classes must use only simple C++ intrinsic types. - 6. Errors are handled by throwing std::string *only*. - 7. Library must not throw any exceptions except std::string. + 6. Errors are handled by returning "true" and setting an optional std::string + 7. Library must not throw any exceptions, period. 8. Interface functions must not have throw() specifications. 9. No duplicate function impementations are permitted within an operating system class. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits