diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-10-13 10:07:13 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-10-13 10:07:13 +0000 |
commit | 3c0ef8cc0dc246bd3083e8cdd63005e8873d36d2 (patch) | |
tree | 58cf4d4581c365f1dcf6a6d99ec91d1c3066504d /lib/CodeGen/CGExpr.cpp | |
parent | 3ae9f48ae0d07a5aa352bf03c944f557a5ac4c95 (diff) |
Simplify pointer creation with the new Type::getInt*Ptr methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index d89da3224f..2834dfeb78 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -969,8 +969,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) { Idx = Builder.CreateMul(Idx, InterfaceSize); - llvm::Type *i8PTy = - llvm::PointerType::getUnqual(llvm::Type::getInt8Ty(VMContext)); + const llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(VMContext); Address = Builder.CreateGEP(Builder.CreateBitCast(Base, i8PTy), Idx, "arrayidx"); Address = Builder.CreateBitCast(Address, Base->getType()); |