diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lli/lli.cpp | 7 | ||||
-rw-r--r-- | tools/llvmc/CompilerDriver.cpp | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index d8f2b16..be9f999 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -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); } diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index a6aff4e..46dbd89 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -576,7 +576,7 @@ private: if (fullpath.isBytecodeFile()) { // Process the dependent libraries recursively Module::LibraryListType modlibs; - if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs)) { + if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs,&err)) { // Traverse the dependent libraries list Module::lib_iterator LI = modlibs.begin(); Module::lib_iterator LE = modlibs.end(); @@ -598,7 +598,8 @@ private: "The dependent libraries could not be extracted from '") + fullpath.toString(); return false; - } + } else + return false; } return true; } |