summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/SDNodeProperties.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2019-02-12 17:36:57 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2019-02-12 17:36:57 +0000
commitdff673bb525040f93bd928e114b1dae15df0681c (patch)
treeb0e288b08a033951f110662d7e846471f2945fea /llvm/utils/TableGen/SDNodeProperties.cpp
parent0e71e73faacf2a061f27654e59c22586adff51b8 (diff)
downloadbcm5719-llvm-dff673bb525040f93bd928e114b1dae15df0681c.tar.gz
bcm5719-llvm-dff673bb525040f93bd928e114b1dae15df0681c.zip
[tablegen] Add locations to many PrintFatalError() calls
Summary: While working on the GISel Combiner, I noticed I was producing location-less error messages fairly often and set about fixing this. In the process, I noticed quite a few places elsewhere in TableGen that also neglected to include a relevant location. This patch adds locations to errors that relate to a specific record (or a field within it) and also have easy access to the relevant location. This is particularly useful when multiclasses are involved as many of these errors refer to the full name of a record and it's difficult to guess which substring is grep-able. Unfortunately, tablegen currently only supports Record granularity so it's not currently possible to point at a specific Init so these sometimes point at the record that caused the error rather than the precise origin of the error. Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, nhaehnle Reviewed By: nhaehnle Subscribers: jdoerfert, nhaehnle, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58077 llvm-svn: 353862
Diffstat (limited to 'llvm/utils/TableGen/SDNodeProperties.cpp')
-rw-r--r--llvm/utils/TableGen/SDNodeProperties.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/SDNodeProperties.cpp b/llvm/utils/TableGen/SDNodeProperties.cpp
index a321503e9e8..1843a78aa3c 100644
--- a/llvm/utils/TableGen/SDNodeProperties.cpp
+++ b/llvm/utils/TableGen/SDNodeProperties.cpp
@@ -38,9 +38,9 @@ unsigned llvm::parseSDPatternOperatorProperties(Record *R) {
} else if (Property->getName() == "SDNPVariadic") {
Properties |= 1 << SDNPVariadic;
} else {
- PrintFatalError("Unknown SD Node property '" +
- Property->getName() + "' on node '" +
- R->getName() + "'!");
+ PrintFatalError(R->getLoc(), "Unknown SD Node property '" +
+ Property->getName() + "' on node '" +
+ R->getName() + "'!");
}
}
OpenPOWER on IntegriCloud