diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-05-07 17:27:56 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-05-07 17:27:56 +0000 |
commit | d3c127e232164e1f15eb901d047dbc409ac6198d (patch) | |
tree | 43ed65f48d79110942d63d63b2912ae62a135d07 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | de5b8016abc59173d12549dc8ee6f15dae7f6c46 (diff) | |
download | llvm-d3c127e232164e1f15eb901d047dbc409ac6198d.zip llvm-d3c127e232164e1f15eb901d047dbc409ac6198d.tar.gz llvm-d3c127e232164e1f15eb901d047dbc409ac6198d.tar.bz2 |
[opaque pointer type] Correctly pass the pointee type when creating a GEP constant expression
llvm-svn: 236751
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 4bd67e0..ee659bc 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2690,7 +2690,8 @@ CodeGenModule::GetAddrOfConstantCFString(const StringLiteral *Literal) { } // String. - Fields[2] = llvm::ConstantExpr::getGetElementPtr(GV->getType(), GV, Zeros); + Fields[2] = + llvm::ConstantExpr::getGetElementPtr(GV->getValueType(), GV, Zeros); if (isUTF16) // Cast the UTF16 string to the correct type. |