summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2014-01-18 22:54:33 +0000
committerEli Bendersky <eliben@google.com>2014-01-18 22:54:33 +0000
commit157a97a6a01424551748ace05bd9c0931e98aefe (patch)
tree2bc7e43f2babac9c450017af2b444cff8482ce5f
parenta6a17d77d2d2f62de61fde0d565e35c06817db67 (diff)
downloadbcm5719-llvm-157a97a6a01424551748ace05bd9c0931e98aefe.tar.gz
bcm5719-llvm-157a97a6a01424551748ace05bd9c0931e98aefe.zip
Support AddrSpaceCast in ConstantExpr::getAsInstruction.
It's handled similarly to the other casts. CastInst::Create already knows how to handle it. llvm-svn: 199565
-rw-r--r--llvm/lib/IR/Constants.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index dbb3495583b..1f6f5ac4270 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -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:
OpenPOWER on IntegriCloud