[llvm] r199565 - Support AddrSpaceCast in ConstantExpr::getAsInstruction.
Eli Bendersky
eliben at google.com
Sat Jan 18 14:54:33 PST 2014
Author: eliben
Date: Sat Jan 18 16:54:33 2014
New Revision: 199565
URL: http://llvm.org/viewvc/llvm-project?rev=199565&view=rev
Log:
Support AddrSpaceCast in ConstantExpr::getAsInstruction.
It's handled similarly to the other casts. CastInst::Create already knows how
to handle it.
Modified:
llvm/trunk/lib/IR/Constants.cpp
Modified: llvm/trunk/lib/IR/Constants.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Constants.cpp?rev=199565&r1=199564&r2=199565&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Constants.cpp (original)
+++ llvm/trunk/lib/IR/Constants.cpp Sat Jan 18 16:54:33 2014
@@ -2783,6 +2783,7 @@ Instruction *ConstantExpr::getAsInstruct
case Instruction::PtrToInt:
case Instruction::IntToPtr:
case Instruction::BitCast:
+ case Instruction::AddrSpaceCast:
return CastInst::Create((Instruction::CastOps)getOpcode(),
Ops[0], getType());
case Instruction::Select:
More information about the llvm-commits
mailing list