isa+cast -> dyn_cast

llvm-svn: 50314
This commit is contained in:
Chris Lattner 2008-04-27 00:16:18 +00:00
parent 4793515a9c
commit a937baeb9b
1 changed files with 2 additions and 4 deletions

View File

@ -3789,10 +3789,8 @@ void SelectionDAGLowering::visitInlineAsm(CallSite CS) {
// If this is an input or an indirect output, process the call argument.
// BasicBlocks are labels, currently appearing only in asm's.
if (OpInfo.CallOperandVal) {
if (isa<BasicBlock>(OpInfo.CallOperandVal))
OpInfo.CallOperand =
DAG.getBasicBlock(FuncInfo.MBBMap[cast<BasicBlock>(
OpInfo.CallOperandVal)]);
if (BasicBlock *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal))
OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]);
else {
OpInfo.CallOperand = getValue(OpInfo.CallOperandVal);
const Type *OpTy = OpInfo.CallOperandVal->getType();