aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-21 14:31:17 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-21 14:31:17 +0000
commita5c04344fa70d6eec34344760c1fe511e16f2d76 (patch)
tree87c73a2a5879d895b05edf71498815ca1f0c7a90 /lib/CodeGen/CGExprConstant.cpp
parent8d366c0e347ab600ac09e2ba9b676d12017a448a (diff)
Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index fc0da99f4f..b900e1f9c6 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -964,7 +964,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E,
if (!Offset->isNullValue()) {
llvm::Type *Type = llvm::Type::getInt8PtrTy(VMContext);
llvm::Constant *Casted = llvm::ConstantExpr::getBitCast(C, Type);
- Casted = llvm::ConstantExpr::getGetElementPtr(Casted, &Offset, 1);
+ Casted = llvm::ConstantExpr::getGetElementPtr(Casted, Offset);
C = llvm::ConstantExpr::getBitCast(Casted, C->getType());
}