summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp')
-rw-r--r--contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp b/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp
index eb80619..9663b71 100644
--- a/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp
+++ b/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp
@@ -220,7 +220,7 @@ void MatcherGen::EmitLeafMatchCode(const TreePatternNode *N) {
}
// An UnsetInit represents a named node without any constraints.
- if (N->getLeafValue() == UnsetInit::get()) {
+ if (isa<UnsetInit>(N->getLeafValue())) {
assert(N->hasName() && "Unnamed ? leaf");
return;
}
@@ -268,8 +268,10 @@ void MatcherGen::EmitLeafMatchCode(const TreePatternNode *N) {
// We can't model ComplexPattern uses that don't have their name taken yet.
// The OPC_CheckComplexPattern operation implicitly records the results.
if (N->getName().empty()) {
- errs() << "We expect complex pattern uses to have names: " << *N << "\n";
- exit(1);
+ std::string S;
+ raw_string_ostream OS(S);
+ OS << "We expect complex pattern uses to have names: " << *N;
+ PrintFatalError(OS.str());
}
// Remember this ComplexPattern so that we can emit it after all the other
OpenPOWER on IntegriCloud