summaryrefslogtreecommitdiff
path: root/include/llvm/TableGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/TableGen')
-rw-r--r--include/llvm/TableGen/Record.h4
-rw-r--r--include/llvm/TableGen/StringMatcher.h2
-rw-r--r--include/llvm/TableGen/StringToOffsetTable.h8
3 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h
index 5a100f0cba76f..fef5bf3045666 100644
--- a/include/llvm/TableGen/Record.h
+++ b/include/llvm/TableGen/Record.h
@@ -1196,6 +1196,9 @@ public:
inline const_arg_iterator arg_begin() const { return Args.begin(); }
inline const_arg_iterator arg_end () const { return Args.end(); }
+ inline iterator_range<const_arg_iterator> args() const {
+ return llvm::make_range(arg_begin(), arg_end());
+ }
inline size_t arg_size () const { return Args.size(); }
inline bool arg_empty() const { return Args.empty(); }
@@ -1462,6 +1465,7 @@ public:
ResolveFirst = b;
}
+ void print(raw_ostream &OS) const;
void dump() const;
//===--------------------------------------------------------------------===//
diff --git a/include/llvm/TableGen/StringMatcher.h b/include/llvm/TableGen/StringMatcher.h
index b438779108346..11a8ad8183aad 100644
--- a/include/llvm/TableGen/StringMatcher.h
+++ b/include/llvm/TableGen/StringMatcher.h
@@ -38,7 +38,7 @@ private:
raw_ostream &OS;
public:
- StringMatcher(StringRef strVariableName,
+ StringMatcher(StringRef strVariableName,
const std::vector<StringPair> &matches, raw_ostream &os)
: StrVariableName(strVariableName), Matches(matches), OS(os) {}
diff --git a/include/llvm/TableGen/StringToOffsetTable.h b/include/llvm/TableGen/StringToOffsetTable.h
index e5b61ed1195e7..aaf2a356ffab6 100644
--- a/include/llvm/TableGen/StringToOffsetTable.h
+++ b/include/llvm/TableGen/StringToOffsetTable.h
@@ -60,10 +60,10 @@ public:
if (AggregateString[i] != '\\')
continue;
- assert(i+1 < AggregateString.size() && "Incomplete escape sequence!");
- if (isdigit(AggregateString[i+1])) {
- assert(isdigit(AggregateString[i+2]) &&
- isdigit(AggregateString[i+3]) &&
+ assert(i + 1 < AggregateString.size() && "Incomplete escape sequence!");
+ if (isdigit(AggregateString[i + 1])) {
+ assert(isdigit(AggregateString[i + 2]) &&
+ isdigit(AggregateString[i + 3]) &&
"Expected 3 digit octal escape!");
O << AggregateString[++i];
O << AggregateString[++i];