diff options
Diffstat (limited to 'utils/TableGen/ClangAttrEmitter.cpp')
-rw-r--r-- | utils/TableGen/ClangAttrEmitter.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp index bca4bb6..26bd878 100644 --- a/utils/TableGen/ClangAttrEmitter.cpp +++ b/utils/TableGen/ClangAttrEmitter.cpp @@ -21,19 +21,17 @@ using namespace llvm; static const std::vector<StringRef> getValueAsListOfStrings(Record &R, StringRef FieldName) { - const ListInit *List = R.getValueAsListInit(FieldName); + ListInit *List = R.getValueAsListInit(FieldName); assert (List && "Got a null ListInit"); std::vector<StringRef> Strings; Strings.reserve(List->getSize()); - for (ListInit::const_iterator i = List->begin(), e = List->end(); - i != e; - ++i) { + for (ListInit::iterator i = List->begin(), e = List->end(); i != e; ++i) { assert(*i && "Got a null element in a ListInit"); - if (const StringInit *S = dynamic_cast<const StringInit *>(*i)) + if (StringInit *S = dynamic_cast<StringInit *>(*i)) Strings.push_back(S->getValue()); - else if (const CodeInit *C = dynamic_cast<const CodeInit *>(*i)) + else if (CodeInit *C = dynamic_cast<CodeInit *>(*i)) Strings.push_back(C->getValue()); else assert(false && "Got a non-string, non-code element in a ListInit"); |