summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenSchedule.cpp
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2012-10-24 22:03:59 +0000
committerJoerg Sonnenberger <joerg@bec.de>2012-10-24 22:03:59 +0000
commit7090937330f51c5876ce66a475be9c0688a4a6d9 (patch)
treeb17e1311a0e0e291bcc2b7d64feedc1f1e5ad7c7 /llvm/utils/TableGen/CodeGenSchedule.cpp
parentdf26a90dc2c451c1c6d68e93b3a013b87c48f776 (diff)
downloadbcm5719-llvm-7090937330f51c5876ce66a475be9c0688a4a6d9.tar.gz
bcm5719-llvm-7090937330f51c5876ce66a475be9c0688a4a6d9.zip
Don't use stack unwinding to provide the location information for
SetTheory, but pass down the location explicitly. llvm-svn: 166629
Diffstat (limited to 'llvm/utils/TableGen/CodeGenSchedule.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenSchedule.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp
index fc101eec614..1cca3e3f859 100644
--- a/llvm/utils/TableGen/CodeGenSchedule.cpp
+++ b/llvm/utils/TableGen/CodeGenSchedule.cpp
@@ -38,8 +38,9 @@ static void dumpIdxVec(const SmallVectorImpl<unsigned> &V) {
// (instrs a, b, ...) Evaluate and union all arguments. Identical to AddOp.
struct InstrsOp : public SetTheory::Operator {
- void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts) {
- ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts);
+ void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,
+ ArrayRef<SMLoc> Loc) {
+ ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts, Loc);
}
};
@@ -55,13 +56,15 @@ struct InstRegexOp : public SetTheory::Operator {
const CodeGenTarget &Target;
InstRegexOp(const CodeGenTarget &t): Target(t) {}
- void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts) {
+ void apply(SetTheory &ST, DagInit *Expr, SetTheory::RecSet &Elts,
+ ArrayRef<SMLoc> Loc) {
SmallVector<Regex*, 4> RegexList;
for (DagInit::const_arg_iterator
AI = Expr->arg_begin(), AE = Expr->arg_end(); AI != AE; ++AI) {
StringInit *SI = dyn_cast<StringInit>(*AI);
if (!SI)
- throw "instregex requires pattern string: " + Expr->getAsString();
+ throw TGError(Loc, "instregex requires pattern string: "
+ + Expr->getAsString());
std::string pat = SI->getValue();
// Implement a python-style prefix match.
if (pat[0] != '^') {
OpenPOWER on IntegriCloud