Support AddrSpaceCast in ConstantExpr::getAsInstruction.

It's handled similarly to the other casts. CastInst::Create already knows how
to handle it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eli Bendersky 2014-01-18 22:54:33 +00:00
parent 6d2bd95ff1
commit e952af7ae5

View File

@ -2783,6 +2783,7 @@ Instruction *ConstantExpr::getAsInstruction() {
case Instruction::PtrToInt:
case Instruction::IntToPtr:
case Instruction::BitCast:
case Instruction::AddrSpaceCast:
return CastInst::Create((Instruction::CastOps)getOpcode(),
Ops[0], getType());
case Instruction::Select: