diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-04-02 18:55:21 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-04-02 18:55:21 +0000 |
commit | e3b172afc33004cb11299e21dbea1dbb4cc4dc27 (patch) | |
tree | 2da7994df7369352010a32f0c0c489f7c8c19ea7 /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | a64723c2bf3a6dade77aa9b87046ec1e72b0a669 (diff) | |
download | bcm5719-llvm-e3b172afc33004cb11299e21dbea1dbb4cc4dc27.tar.gz bcm5719-llvm-e3b172afc33004cb11299e21dbea1dbb4cc4dc27.zip |
[opaque pointer type] Update for GEP API changes in LLVM
Now the GEP constant utility functions require the type to be explicitly
passed (since eventually the pointer type will be opaque and not convey
the required type information). For now callers can still pass nullptr
(though none were needed here in Clang, which is nice) if
convenienc/necessary, but eventually that will be disallowed as well.
llvm-svn: 233937
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 7406354bdc8..b1cf99c4ee5 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1115,7 +1115,7 @@ llvm::Constant *CodeGenModule::EmitConstantValue(const APValue &Value, unsigned AS = C->getType()->getPointerAddressSpace(); llvm::Type *CharPtrTy = Int8Ty->getPointerTo(AS); llvm::Constant *Casted = llvm::ConstantExpr::getBitCast(C, CharPtrTy); - Casted = llvm::ConstantExpr::getGetElementPtr(Casted, Offset); + Casted = llvm::ConstantExpr::getGetElementPtr(Int8Ty, Casted, Offset); C = llvm::ConstantExpr::getPointerCast(Casted, C->getType()); } |