aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm2cpp/CppWriter.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-09-28 19:28:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-09-28 19:28:24 +0000
commit5b7e753d9523f7cfd469f1b08a9a26976024fe37 (patch)
tree2621468c4c5e445038d93afb27c62b4fac397640 /tools/llvm2cpp/CppWriter.cpp
parent2a0b2b292af1b67187a48546a2abb8182e233dca (diff)
Fix PR902:
Errors are generated with the YYERROR macro which can only be called from a production (inside yyparse) because of the goto statement in the macro. This lead to several situations where GEN_ERROR was not called but GenerateError was used instead (because it doesn't use YYERROR). However, in such situations, catching the error much later (e.g. at the end of the production) is not sufficient because LLVM can assert on invalid data before the end of the production is reached. The solution is to ensure that the CHECK_FOR_ERROR macro (which invokes YYERROR if there's an error) is used as soon as possible after a call to GenerateError has been made. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30650 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm2cpp/CppWriter.cpp')
0 files changed, 0 insertions, 0 deletions