aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-10-08 14:59:05 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-10-08 14:59:05 +0000
commitcf4f81037203909420f47a195109115c9f83e6ba (patch)
treeb69fa1d8e3555cfa365cd8cf66f5dcaffdd8311e
parent6843e38cb163bc4183f9a20375d90f5b0abb9256 (diff)
Properly `quote' names, and don't forget to add the ending quote!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16838 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/Record.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/utils/TableGen/Record.cpp b/utils/TableGen/Record.cpp
index 2041da6c63..38e1dff89f 100644
--- a/utils/TableGen/Record.cpp
+++ b/utils/TableGen/Record.cpp
@@ -609,8 +609,8 @@ std::ostream &llvm::operator<<(std::ostream &OS, const Record &R) {
Init *Record::getValueInit(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
return R->getValue();
}
@@ -622,12 +622,12 @@ Init *Record::getValueInit(const std::string &FieldName) const {
std::string Record::getValueAsString(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (const StringInit *SI = dynamic_cast<const StringInit*>(R->getValue()))
return SI->getValue();
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a string initializer!";
}
@@ -638,12 +638,12 @@ std::string Record::getValueAsString(const std::string &FieldName) const {
BitsInit *Record::getValueAsBitsInit(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (BitsInit *BI = dynamic_cast<BitsInit*>(R->getValue()))
return BI;
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a BitsInit initializer!";
}
@@ -654,12 +654,12 @@ BitsInit *Record::getValueAsBitsInit(const std::string &FieldName) const {
ListInit *Record::getValueAsListInit(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (ListInit *LI = dynamic_cast<ListInit*>(R->getValue()))
return LI;
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a list initializer!";
}
@@ -670,12 +670,12 @@ ListInit *Record::getValueAsListInit(const std::string &FieldName) const {
int Record::getValueAsInt(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (IntInit *II = dynamic_cast<IntInit*>(R->getValue()))
return II->getValue();
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a list initializer!";
}
@@ -686,12 +686,12 @@ int Record::getValueAsInt(const std::string &FieldName) const {
Record *Record::getValueAsDef(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (DefInit *DI = dynamic_cast<DefInit*>(R->getValue()))
return DI->getDef();
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a list initializer!";
}
@@ -702,12 +702,12 @@ Record *Record::getValueAsDef(const std::string &FieldName) const {
bool Record::getValueAsBit(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (BitInit *BI = dynamic_cast<BitInit*>(R->getValue()))
return BI->getValue();
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a bit initializer!";
}
@@ -718,12 +718,12 @@ bool Record::getValueAsBit(const std::string &FieldName) const {
DagInit *Record::getValueAsDag(const std::string &FieldName) const {
const RecordVal *R = getValue(FieldName);
if (R == 0 || R->getValue() == 0)
- throw "Record '" + getName() + "' does not have a field named '" +
- FieldName + "!\n";
+ throw "Record `" + getName() + "' does not have a field named `" +
+ FieldName + "'!\n";
if (DagInit *DI = dynamic_cast<DagInit*>(R->getValue()))
return DI;
- throw "Record '" + getName() + "', field '" + FieldName +
+ throw "Record `" + getName() + "', field `" + FieldName +
"' does not have a dag initializer!";
}
@@ -753,7 +753,7 @@ std::vector<Record*>
RecordKeeper::getAllDerivedDefinitions(const std::string &ClassName) const {
Record *Class = Records.getClass(ClassName);
if (!Class)
- throw "ERROR: Couldn't find the '" + ClassName + "' class!\n";
+ throw "ERROR: Couldn't find the `" + ClassName + "' class!\n";
std::vector<Record*> Defs;
for (std::map<std::string, Record*>::const_iterator I = getDefs().begin(),