[llvm] r218085 - Use cast<> instead of unchecked dyn_cast<>
Matt Arsenault
Matthew.Arsenault at amd.com
Thu Sep 18 15:28:57 PDT 2014
Author: arsenm
Date: Thu Sep 18 17:28:56 2014
New Revision: 218085
URL: http://llvm.org/viewvc/llvm-project?rev=218085&view=rev
Log:
Use cast<> instead of unchecked dyn_cast<>
Modified:
llvm/trunk/lib/IR/DataLayout.cpp
Modified: llvm/trunk/lib/IR/DataLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=218085&r1=218084&r2=218085&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DataLayout.cpp (original)
+++ llvm/trunk/lib/IR/DataLayout.cpp Thu Sep 18 17:28:56 2014
@@ -641,7 +641,7 @@ unsigned DataLayout::getAlignment(Type *
? getPointerABIAlignment(0)
: getPointerPrefAlignment(0));
case Type::PointerTyID: {
- unsigned AS = dyn_cast<PointerType>(Ty)->getAddressSpace();
+ unsigned AS = cast<PointerType>(Ty)->getAddressSpace();
return (abi_or_pref
? getPointerABIAlignment(AS)
: getPointerPrefAlignment(AS));
More information about the llvm-commits
mailing list