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)
commitaeda4909767d802ed96115b8e3e6c6f394f5a96e
tree6499075c6af22d746ca0a8478891b273e1e67461
parent1d4481df823996a8637e5aadfd07c2a335f90d5c
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237058 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/Error.cpp
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/CodeGenTarget.cpp
utils/TableGen/DAGISelMatcherGen.cpp
utils/TableGen/InstrInfoEmitter.cpp
utils/TableGen/SubtargetEmitter.cpp