diff options
author | Dale Johannesen <dalej@apple.com> | 2009-08-06 22:45:51 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-08-06 22:45:51 +0000 |
commit | 352fa9299592fd01b344366f865c6f7367d3e599 (patch) | |
tree | 082d37ea109002aa257498072d477d0ce974f048 | |
parent | 040e3b91daf31d4873e9e876646e85d3ae844c8d (diff) | |
download | bcm5719-llvm-352fa9299592fd01b344366f865c6f7367d3e599.tar.gz bcm5719-llvm-352fa9299592fd01b344366f865c6f7367d3e599.zip |
Use stripPointerCasts instead of partially rewriting it.
llvm-svn: 78350
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index c991bae93ba..73b75797d6b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -5137,10 +5137,8 @@ void SelectionDAGLowering::visitInlineAsm(CallSite CS) { // BasicBlocks are labels, currently appearing only in asm's. if (OpInfo.CallOperandVal) { // Strip bitcasts, if any. This mostly comes up for functions. - ConstantExpr* CE = NULL; - while ((CE = dyn_cast<ConstantExpr>(OpInfo.CallOperandVal)) && - CE->getOpcode()==Instruction::BitCast) - OpInfo.CallOperandVal = CE->getOperand(0); + OpInfo.CallOperandVal = OpInfo.CallOperandVal->stripPointerCasts(); + if (BasicBlock *BB = dyn_cast<BasicBlock>(OpInfo.CallOperandVal)) { OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); } else { |