Fix tablegen's PrintFatalError function to run registered file
authorJames Y Knight <jyknight@google.com>
Mon, 11 May 2015 22:17:13 +0000 (22:17 +0000)
committerJames Y Knight <jyknight@google.com>
Mon, 11 May 2015 22:17:13 +0000 (22:17 +0000)
commite452e271293f282d3cdaf0782ec2820c0f7e4d48
treeaaa745d84607c3e977fe5dde1a0bde92ec07402a
parentbf59c34bfd27dc876a32fc38332eb8a3028fa8f9
Fix tablegen's PrintFatalError function to run registered file
cleanups.

Also, change code in tablegen which printed a message and then called
"exit(1)" to use PrintFatalError, instead.

This fixes instances where an empty output file was left behind after
a failed tablegen invocation, which would confuse subsequent ninja
runs into not attempting to rebuild.

Differential Revision: http://reviews.llvm.org/D9608

llvm-svn: 237058
llvm/lib/TableGen/Error.cpp
llvm/utils/TableGen/CodeGenDAGPatterns.cpp
llvm/utils/TableGen/CodeGenTarget.cpp
llvm/utils/TableGen/DAGISelMatcherGen.cpp
llvm/utils/TableGen/InstrInfoEmitter.cpp
llvm/utils/TableGen/SubtargetEmitter.cpp