diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-04-05 22:45:47 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-04-05 22:45:47 +0000 |
commit | 1ed728c499b456f3a2362601b616c192731065fc (patch) | |
tree | c9db29565f7cd9a25328d1c929e1c20b3fcb1009 /clang/lib/CodeGen/CGDecl.cpp | |
parent | 1b01e7e26381f72a26be81d531ee02652fce4e59 (diff) | |
download | llvm-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/CGDecl.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index f64e368..cb4c4cb 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -635,8 +635,9 @@ void CodeGenFunction::EmitScalarInit(const Expr *init, const ValueDecl *D, if (capturedByInit) { // We can use a simple GEP for this because it can't have been // moved yet. - tempLV.setAddress(Builder.CreateStructGEP(tempLV.getAddress(), - getByRefValueLLVMField(cast<VarDecl>(D)))); + tempLV.setAddress( + Builder.CreateStructGEP(nullptr, tempLV.getAddress(), + getByRefValueLLVMField(cast<VarDecl>(D)).second)); } llvm::PointerType *ty |