mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Remove exception handling usage from tblgen.
Most places can use PrintFatalError as the unwinding mechanism was not used for anything other than printing the error. The single exception was CodeGenDAGPatterns.cpp, where intermediate errors during type resolution were ignored to simplify incremental platform development. This use is replaced by an error flag in TreePattern and bailout earlier in various places if it is set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "CodeGenTarget.h"
|
||||
#include "llvm/TableGen/Error.h"
|
||||
#include "llvm/TableGen/Record.h"
|
||||
#include "llvm/TableGen/TableGenBackend.h"
|
||||
#include <cassert>
|
||||
@@ -93,7 +94,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
O << Action->getValueAsString("Predicate");
|
||||
} else {
|
||||
Action->dump();
|
||||
throw "Unknown CCPredicateAction!";
|
||||
PrintFatalError("Unknown CCPredicateAction!");
|
||||
}
|
||||
|
||||
O << ") {\n";
|
||||
@@ -131,7 +132,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
ListInit *ShadowRegList = Action->getValueAsListInit("ShadowRegList");
|
||||
if (ShadowRegList->getSize() >0 &&
|
||||
ShadowRegList->getSize() != RegList->getSize())
|
||||
throw "Invalid length of list of shadowed registers";
|
||||
PrintFatalError("Invalid length of list of shadowed registers");
|
||||
|
||||
if (RegList->getSize() == 1) {
|
||||
O << IndentStr << "if (unsigned Reg = State.AllocateReg(";
|
||||
@@ -221,7 +222,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
O << IndentStr << IndentStr << "return false;\n";
|
||||
} else {
|
||||
Action->dump();
|
||||
throw "Unknown CCAction!";
|
||||
PrintFatalError("Unknown CCAction!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user