diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-10 18:50:11 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-10 18:50:11 +0000 |
commit | b50df4a3df6db2ace3c011267934d3d10bdcc8db (patch) | |
tree | 99df2ac95964d12884f3271efbe500f4a7651870 /utils | |
parent | d122009e57217bd574703c46dd14b1a9235ed0b7 (diff) |
TableGen: Keep track of superclass reference ranges.
def foo : bar;
~~~
This allows us to produce more precise diagnostics about a certain
superclass, and even provide fixits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/CodeGenRegisters.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/TableGen/CodeGenRegisters.cpp b/utils/TableGen/CodeGenRegisters.cpp index 20d439f8f7..e902ce031f 100644 --- a/utils/TableGen/CodeGenRegisters.cpp +++ b/utils/TableGen/CodeGenRegisters.cpp @@ -636,8 +636,10 @@ struct TupleExpander : SetTheory::Expander { Elts.insert(NewReg); // Copy Proto super-classes. - for (unsigned i = 0, e = Proto->getSuperClasses().size(); i != e; ++i) - NewReg->addSuperClass(Proto->getSuperClasses()[i]); + ArrayRef<Record *> Supers = Proto->getSuperClasses(); + ArrayRef<SMRange> Ranges = Proto->getSuperClassRanges(); + for (unsigned i = 0, e = Supers.size(); i != e; ++i) + NewReg->addSuperClass(Supers[i], Ranges[i]); // Copy Proto fields. for (unsigned i = 0, e = Proto->getValues().size(); i != e; ++i) { |