mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-19 01:48:34 +00:00
Use stripPointerCasts instead of partially rewriting it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78350 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
268e35d99f
commit
76711246d9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user