For PR797:

Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-08-25 17:43:11 +00:00
parent ac12322710
commit 0b5a504d10
10 changed files with 325 additions and 234 deletions

View File

@@ -59,11 +59,10 @@ int main(int argc, char **argv, char * const *envp) {
// Load the bytecode...
std::string ErrorMsg;
ModuleProvider *MP = 0;
try {
MP = getBytecodeModuleProvider(InputFile);
} catch (std::string &err) {
MP = getBytecodeModuleProvider(InputFile, &ErrorMsg);
if (!MP) {
std::cerr << "Error loading program '" << InputFile << "': "
<< err << "\n";
<< ErrorMsg << "\n";
exit(1);
}