diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-11 11:01:46 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-05-11 11:01:46 +0000 |
commit | 3ff9c51eba3bb08dd3775733db52a9f11c4ef84c (patch) | |
tree | 0cc1adfc56556244dfc838273598a1d7a842a9c1 /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | aeed0a30c0ba69fb141e78d85270269fccf034a8 (diff) | |
download | llvm-3ff9c51eba3bb08dd3775733db52a9f11c4ef84c.zip llvm-3ff9c51eba3bb08dd3775733db52a9f11c4ef84c.tar.gz llvm-3ff9c51eba3bb08dd3775733db52a9f11c4ef84c.tar.bz2 |
ConstantLValueEmitter::tryEmitAbsolute - remove unused variable. NFCI.
Duplicate getOffset() call.
llvm-svn: 360515
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 4c0256f..11d344f 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1695,8 +1695,6 @@ llvm::Constant *ConstantLValueEmitter::tryEmit() { /// bitcast to pointer type. llvm::Constant * ConstantLValueEmitter::tryEmitAbsolute(llvm::Type *destTy) { - auto offset = getOffset(); - // If we're producing a pointer, this is easy. auto destPtrTy = cast<llvm::PointerType>(destTy); if (Value.isNullPointer()) { @@ -1708,7 +1706,7 @@ ConstantLValueEmitter::tryEmitAbsolute(llvm::Type *destTy) { // to a pointer. // FIXME: signedness depends on the original integer type. auto intptrTy = CGM.getDataLayout().getIntPtrType(destPtrTy); - llvm::Constant *C = offset; + llvm::Constant *C; C = llvm::ConstantExpr::getIntegerCast(getOffset(), intptrTy, /*isSigned*/ false); C = llvm::ConstantExpr::getIntToPtr(C, destPtrTy); |