diff options
| author | Sean Silva <silvas@purdue.edu> | 2012-10-10 20:24:47 +0000 |
|---|---|---|
| committer | Sean Silva <silvas@purdue.edu> | 2012-10-10 20:24:47 +0000 |
| commit | 3f7b7f8ce0b050fc6a0100839d9c5a84198b2aed (patch) | |
| tree | b229fa1cc21ace68695e23723471305c15eaf0d1 /utils/TableGen/FastISelEmitter.cpp | |
| parent | 6cfc806a6b82b60a3e923b6b89f2b4da62cdb50b (diff) | |
tblgen: Use semantically correct RTTI functions.
Also, some minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/FastISelEmitter.cpp')
| -rw-r--r-- | utils/TableGen/FastISelEmitter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp index c6d71ff8cf..03e918fa4b 100644 --- a/utils/TableGen/FastISelEmitter.cpp +++ b/utils/TableGen/FastISelEmitter.cpp @@ -406,13 +406,12 @@ static std::string PhyRegForNode(TreePatternNode *Op, if (!Op->isLeaf()) return PhysReg; - DefInit *OpDI = dyn_cast<DefInit>(Op->getLeafValue()); - Record *OpLeafRec = OpDI->getDef(); + Record *OpLeafRec = cast<DefInit>(Op->getLeafValue())->getDef(); if (!OpLeafRec->isSubClassOf("Register")) return PhysReg; - PhysReg += static_cast<StringInit*>(OpLeafRec->getValue( \ - "Namespace")->getValue())->getValue(); + PhysReg += cast<StringInit>(OpLeafRec->getValue("Namespace")->getValue()) + ->getValue(); PhysReg += "::"; PhysReg += Target.getRegBank().getReg(OpLeafRec)->getName(); return PhysReg; |
