From 40bb451c94a00502358546214d6d00a7c523c31d Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Fri, 18 Aug 2006 09:07:54 +0000 Subject: [PATCH] For PR797: Update to reflect ParseException becoming ParseError (from Parser.h) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29766 91177308-0d34-0410-b5e6-96231b3b80d8 --- projects/Stacker/lib/compiler/StackerCompiler.cpp | 5 +++-- projects/Stacker/lib/compiler/StackerCompiler.h | 4 +++- projects/Stacker/tools/stkrc/stkrc.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/Stacker/lib/compiler/StackerCompiler.cpp b/projects/Stacker/lib/compiler/StackerCompiler.cpp index b9e41a889ce..a6d3995045b 100644 --- a/projects/Stacker/lib/compiler/StackerCompiler.cpp +++ b/projects/Stacker/lib/compiler/StackerCompiler.cpp @@ -110,8 +110,9 @@ StackerCompiler::compile( if (F == 0) { - throw ParseException(filename, - "Could not open file '" + filename + "'"); + ParseError Err; + Err.setError(filename, "Could not open file '" + filename + "'"); + throw Err; } } diff --git a/projects/Stacker/lib/compiler/StackerCompiler.h b/projects/Stacker/lib/compiler/StackerCompiler.h index 383e569c251..ef09cdb469a 100644 --- a/projects/Stacker/lib/compiler/StackerCompiler.h +++ b/projects/Stacker/lib/compiler/StackerCompiler.h @@ -158,7 +158,9 @@ class StackerCompiler { if (line == -1) line = Stackerlineno; // TODO: column number in exception - throw ParseException(TheInstance->CurFilename, message, line); + ParseError Err; + Err.setError(TheInstance->CurFilename, message, line); + throw Err; } private: /// @brief Generate code to increment the stack index diff --git a/projects/Stacker/tools/stkrc/stkrc.cpp b/projects/Stacker/tools/stkrc/stkrc.cpp index 647fee42a91..727b044c20f 100644 --- a/projects/Stacker/tools/stkrc/stkrc.cpp +++ b/projects/Stacker/tools/stkrc/stkrc.cpp @@ -164,7 +164,7 @@ int main(int argc, char **argv) } WriteBytecodeToFile(M.get(), *Out); - } catch (const ParseException &E) { + } catch (const ParseError &E) { std::cerr << argv[0] << ": " << E.getMessage() << "\n"; return 1; } -- 2.34.1