forked from OSchip/llvm-project
Support AddrSpaceCast in ConstantExpr::getAsInstruction.
It's handled similarly to the other casts. CastInst::Create already knows how to handle it. llvm-svn: 199565
This commit is contained in:
parent
a6a17d77d2
commit
157a97a6a0
|
@ -2783,6 +2783,7 @@ Instruction *ConstantExpr::getAsInstruction() {
|
||||||
case Instruction::PtrToInt:
|
case Instruction::PtrToInt:
|
||||||
case Instruction::IntToPtr:
|
case Instruction::IntToPtr:
|
||||||
case Instruction::BitCast:
|
case Instruction::BitCast:
|
||||||
|
case Instruction::AddrSpaceCast:
|
||||||
return CastInst::Create((Instruction::CastOps)getOpcode(),
|
return CastInst::Create((Instruction::CastOps)getOpcode(),
|
||||||
Ops[0], getType());
|
Ops[0], getType());
|
||||||
case Instruction::Select:
|
case Instruction::Select:
|
||||||
|
|
Loading…
Reference in New Issue