Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166691 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/OptParserEmitter.cpp b/utils/TableGen/OptParserEmitter.cpp
index f095a28..674c89a 100644
--- a/utils/TableGen/OptParserEmitter.cpp
+++ b/utils/TableGen/OptParserEmitter.cpp
@@ -77,7 +77,7 @@
B->getValueAsListOfStrings("Prefixes")) {
PrintError(A->getLoc(), Twine("Option is equivilent to"));
PrintError(B->getLoc(), Twine("Other defined here"));
- throw "Eqivilant Options found.";
+ PrintFatalError("Equivalent Options found.");
}
return APrec < BPrec ? -1 : 1;
}