X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FOptParserEmitter.cpp;h=f4d7be52db91f7e8f02f331df85060c61aea610a;hb=d4a9066c93da9a5aab47ca228d82e796fdec70c0;hp=431026c669c34ebbe7a0ee90538230beacf9fb2a;hpb=7ae0df41422193e65231a0f9526bfe66067c6532;p=oota-llvm.git diff --git a/utils/TableGen/OptParserEmitter.cpp b/utils/TableGen/OptParserEmitter.cpp index 431026c669c..f4d7be52db9 100644 --- a/utils/TableGen/OptParserEmitter.cpp +++ b/utils/TableGen/OptParserEmitter.cpp @@ -56,7 +56,7 @@ static int CompareOptionRecords(const void *Av, const void *Bv) { static const std::string getOptionName(const Record &R) { // Use the record name unless EnumName is defined. - if (dynamic_cast(R.getValueInit("EnumName"))) + if (dynamic_cast(R.getValueInit("EnumName"))) return R.getName(); return R.getValueAsString("EnumName"); @@ -105,7 +105,7 @@ void OptParserEmitter::run(raw_ostream &OS) { // The containing option group (if any). OS << ", "; - if (const DefInit *DI = dynamic_cast(R.getValueInit("Group"))) + if (const DefInit *DI = dynamic_cast(R.getValueInit("Group"))) OS << getOptionName(*DI->getDef()); else OS << "INVALID"; @@ -114,7 +114,7 @@ void OptParserEmitter::run(raw_ostream &OS) { OS << ", INVALID, 0, 0"; // The option help text. - if (!dynamic_cast(R.getValueInit("HelpText"))) { + if (!dynamic_cast(R.getValueInit("HelpText"))) { OS << ",\n"; OS << " "; write_cstring(OS, R.getValueAsString("HelpText")); @@ -145,14 +145,14 @@ void OptParserEmitter::run(raw_ostream &OS) { // The containing option group (if any). OS << ", "; - if (const DefInit *DI = dynamic_cast(R.getValueInit("Group"))) + if (const DefInit *DI = dynamic_cast(R.getValueInit("Group"))) OS << getOptionName(*DI->getDef()); else OS << "INVALID"; // The option alias (if any). OS << ", "; - if (const DefInit *DI = dynamic_cast(R.getValueInit("Alias"))) + if (const DefInit *DI = dynamic_cast(R.getValueInit("Alias"))) OS << getOptionName(*DI->getDef()); else OS << "INVALID"; @@ -166,7 +166,7 @@ void OptParserEmitter::run(raw_ostream &OS) { for (unsigned i = 0, e = LI->size(); i != e; ++i) { if (i) OS << " | "; - OS << dynamic_cast(LI->getElement(i))->getDef()->getName(); + OS << dynamic_cast(LI->getElement(i))->getDef()->getName(); } } @@ -174,7 +174,7 @@ void OptParserEmitter::run(raw_ostream &OS) { OS << ", " << R.getValueAsInt("NumArgs"); // The option help text. - if (!dynamic_cast(R.getValueInit("HelpText"))) { + if (!dynamic_cast(R.getValueInit("HelpText"))) { OS << ",\n"; OS << " "; write_cstring(OS, R.getValueAsString("HelpText")); @@ -183,7 +183,7 @@ void OptParserEmitter::run(raw_ostream &OS) { // The option meta-variable name. OS << ", "; - if (!dynamic_cast(R.getValueInit("MetaVarName"))) + if (!dynamic_cast(R.getValueInit("MetaVarName"))) write_cstring(OS, R.getValueAsString("MetaVarName")); else OS << "0";