[llvm] r209310 - Use cast<> instead of unchecked dyn_cast

Matt Arsenault Matthew.Arsenault at amd.com
Wed May 21 11:03:59 PDT 2014


Author: arsenm
Date: Wed May 21 13:03:59 2014
New Revision: 209310

URL: http://llvm.org/viewvc/llvm-project?rev=209310&view=rev
Log:
Use cast<> instead of unchecked dyn_cast

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp?rev=209310&r1=209309&r2=209310&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp Wed May 21 13:03:59 2014
@@ -591,7 +591,7 @@ SDValue AMDGPUTargetLowering::LowerGloba
     unsigned Size = TD->getTypeAllocSize(EltType);
     unsigned Alignment = TD->getPrefTypeAlignment(EltType);
 
-    const GlobalVariable *Var = dyn_cast<GlobalVariable>(GV);
+    const GlobalVariable *Var = cast<GlobalVariable>(GV);
     const Constant *Init = Var->getInitializer();
     int FI = FrameInfo->CreateStackObject(Size, Alignment, false);
     SDValue InitPtr = DAG.getFrameIndex(FI,





More information about the llvm-commits mailing list