Bugzilla – Bug 235
Tablegen aborts on errors
Last modified: 2004-02-13 11:50:00
You need to log in before you can comment on or make changes to this bug.
Tablegen dumps core if you try to use the "include" statement to include a file that doesn't exist. For example: 185 zion> echo 'include "../crzjgrdwldiwdc.td"' > whoops.td 186 zion> tblgen whoops.td Parsing whoops.td:1: Could not find include file '/../crzjgrdwldiwdc.td'! Abort (core dumped) Also note the error message has the wrong filename.
Tablegen's entire error recovery strategy is built around the idea that calling 'abort' is a solution. This certainly should be fixed, but it's not a high priority. :) -Chris
I'm a fan of incremental improvement - as the *original* title of the bug implied, I would be satisfied with something that just called exit(1) instead of dumping core. :-)
Oh, and this patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040209/011581.html Fixes the 'wrong filename' problem: $ echo 'include "../crzjgrdwldiwdc.td"' | tblgen Parsing <stdin>:1: Could not find include file '../crzjgrdwldiwdc.td'! Abort -Chris
I would support exit(1). :) -Chris
Fine, have it your way. :) I thought tablegen abort'ing for the fun of it was kinda cute myself. Especially the plethora of core files that you get to accumulate. No fun for tablegen I guess. Patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040209/011582.html -Chris
Thanks!