From 275769a77acd8f0dadbf9ca03384b31c9f1c3e01 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 23 Jul 2007 20:24:29 +0000 Subject: [PATCH] Fix some uses of dyn_cast to be uses of cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40443 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/DwarfWriter.cpp | 2 +- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- lib/Target/X86/X86ISelLowering.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 257a776d2f1..e157e58bd4c 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -1546,7 +1546,7 @@ private: break; } - FromTy = dyn_cast(FromTy)->getFromType(); + FromTy = cast(FromTy)->getFromType(); } // Unless we have a bit field. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4b768c23540..9b146eef629 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3210,7 +3210,7 @@ HandleSDNode::~HandleSDNode() { GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT, int o) : SDNode(isa(GA) && - dyn_cast(GA)->isThreadLocal() ? + cast(GA)->isThreadLocal() ? // Thread Local (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) : // Non Thread Local diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 2c4234b93fe..a25710ba5aa 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -4676,8 +4676,8 @@ static bool isConsecutiveLoad(SDNode *N, SDNode *Base, int Dist, int Size, if (Loc.getOpcode() == ISD::FrameIndex) { if (BaseLoc.getOpcode() != ISD::FrameIndex) return false; - int FI = dyn_cast(Loc)->getIndex(); - int BFI = dyn_cast(BaseLoc)->getIndex(); + int FI = cast(Loc)->getIndex(); + int BFI = cast(BaseLoc)->getIndex(); int FS = MFI->getObjectSize(FI); int BFS = MFI->getObjectSize(BFI); if (FS != BFS || FS != Size) return false; @@ -4704,7 +4704,7 @@ static bool isBaseAlignment16(SDNode *Base, MachineFrameInfo *MFI, return (GV->getAlignment() >= 16 && (Offset % 16) == 0); else { assert(Base->getOpcode() == ISD::FrameIndex && "Unexpected base node!"); - int BFI = dyn_cast(Base)->getIndex(); + int BFI = cast(Base)->getIndex(); if (BFI < 0) // Fixed objects do not specify alignment, however the offsets are known. return ((Subtarget->getStackAlignment() % 16) == 0 &&