mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
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%)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29882 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,26 +147,21 @@ public:
|
||||
);
|
||||
|
||||
/// @brief Parse all function bodies
|
||||
void ParseAllFunctionBodies();
|
||||
bool ParseAllFunctionBodies(std::string* ErrMsg);
|
||||
|
||||
/// @brief Parse the next function of specific type
|
||||
void ParseFunction(Function* Func) ;
|
||||
bool ParseFunction(Function* Func, std::string* ErrMsg) ;
|
||||
|
||||
/// This method is abstract in the parent ModuleProvider class. Its
|
||||
/// implementation is identical to the ParseFunction method.
|
||||
/// @see ParseFunction
|
||||
/// @brief Make a specific function materialize.
|
||||
virtual bool materializeFunction(Function *F, std::string *ErrInfo = 0) {
|
||||
virtual bool materializeFunction(Function *F, std::string *ErrMsg = 0) {
|
||||
LazyFunctionMap::iterator Fi = LazyFunctionLoadMap.find(F);
|
||||
if (Fi == LazyFunctionLoadMap.end()) return false;
|
||||
try {
|
||||
ParseFunction(F);
|
||||
} catch (std::string &ErrStr) {
|
||||
if (ErrInfo) *ErrInfo = ErrStr;
|
||||
if (Fi == LazyFunctionLoadMap.end())
|
||||
return false;
|
||||
if (ParseFunction(F,ErrMsg))
|
||||
return true;
|
||||
} catch (...) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -174,15 +169,9 @@ public:
|
||||
/// implementation is identical to ParseAllFunctionBodies.
|
||||
/// @see ParseAllFunctionBodies
|
||||
/// @brief Make the whole module materialize
|
||||
virtual Module* materializeModule(std::string *ErrInfo = 0) {
|
||||
try {
|
||||
ParseAllFunctionBodies();
|
||||
} catch (std::string &ErrStr) {
|
||||
if (ErrInfo) *ErrInfo = ErrStr;
|
||||
virtual Module* materializeModule(std::string *ErrMsg = 0) {
|
||||
if (ParseAllFunctionBodies(ErrMsg))
|
||||
return 0;
|
||||
} catch (...) {
|
||||
return 0;
|
||||
}
|
||||
return TheModule;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user