aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-04-05 22:45:47 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-04-05 22:45:47 +0000
commit1ed728c499b456f3a2362601b616c192731065fc (patch)
treec9db29565f7cd9a25328d1c929e1c20b3fcb1009 /clang/lib/CodeGen/CodeGenFunction.h
parent1b01e7e26381f72a26be81d531ee02652fce4e59 (diff)
downloadllvm-1ed728c499b456f3a2362601b616c192731065fc.zip
llvm-1ed728c499b456f3a2362601b616c192731065fc.tar.gz
llvm-1ed728c499b456f3a2362601b616c192731065fc.tar.bz2
[opaque pointer type] More GEP API migrations
Looks like the VTable code in particular will need some work to pass around the pointee type explicitly. llvm-svn: 234128
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index bce9482..8d3408a 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -851,7 +851,8 @@ public:
/// getByrefValueFieldNumber - Given a declaration, returns the LLVM field
/// number that holds the value.
- unsigned getByRefValueLLVMField(const ValueDecl *VD) const;
+ std::pair<llvm::Type *, unsigned>
+ getByRefValueLLVMField(const ValueDecl *VD) const;
/// BuildBlockByrefAddress - Computes address location of the
/// variable which is declared as __block.
@@ -1896,8 +1897,8 @@ public:
llvm::Value *getObjectAddress(CodeGenFunction &CGF) const {
if (!IsByRef) return Address;
- return CGF.Builder.CreateStructGEP(Address,
- CGF.getByRefValueLLVMField(Variable),
+ auto F = CGF.getByRefValueLLVMField(Variable);
+ return CGF.Builder.CreateStructGEP(F.first, Address, F.second,
Variable->getNameAsString());
}
};