From 88eb8dd4ed11dafb125c46909c84f10e7037d2b7 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Wed, 10 Oct 2012 20:24:47 +0000 Subject: tblgen: Use semantically correct RTTI functions. Also, some minor cleanup. llvm-svn: 165647 --- llvm/lib/TableGen/TGParser.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'llvm/lib/TableGen/TGParser.cpp') diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 1b1c18b589a..b1f9f724efd 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -406,8 +406,7 @@ Init *TGParser::ParseObjectName(MultiClass *CurMultiClass) { RecTy *Type = 0; if (CurRec) { - const TypedInit *CurRecName = - dyn_cast(CurRec->getNameInit()); + const TypedInit *CurRecName = dyn_cast(CurRec->getNameInit()); if (!CurRecName) { TokError("Record name is not typed!"); return 0; @@ -1050,20 +1049,20 @@ Init *TGParser::ParseOperation(Record *CurRec) { MHSTy = MHSt->getType(); if (BitsInit *MHSbits = dyn_cast(MHS)) MHSTy = BitsRecTy::get(MHSbits->getNumBits()); - if (dyn_cast(MHS)) + if (isa(MHS)) MHSTy = BitRecTy::get(); if (TypedInit *RHSt = dyn_cast(RHS)) RHSTy = RHSt->getType(); if (BitsInit *RHSbits = dyn_cast(RHS)) RHSTy = BitsRecTy::get(RHSbits->getNumBits()); - if (dyn_cast(RHS)) + if (isa(RHS)) RHSTy = BitRecTy::get(); // For UnsetInit, it's typed from the other hand. - if (dyn_cast(MHS)) + if (isa(MHS)) MHSTy = RHSTy; - if (dyn_cast(RHS)) + if (isa(RHS)) RHSTy = MHSTy; if (!MHSTy || !RHSTy) { -- cgit v1.2.3