r360515 - ConstantLValueEmitter::tryEmitAbsolute - remove unused variable. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Sat May 11 04:01:46 PDT 2019
Author: rksimon
Date: Sat May 11 04:01:46 2019
New Revision: 360515
URL: http://llvm.org/viewvc/llvm-project?rev=360515&view=rev
Log:
ConstantLValueEmitter::tryEmitAbsolute - remove unused variable. NFCI.
Duplicate getOffset() call.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=360515&r1=360514&r2=360515&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Sat May 11 04:01:46 2019
@@ -1695,8 +1695,6 @@ llvm::Constant *ConstantLValueEmitter::t
/// 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(l
// 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);
More information about the cfe-commits
mailing list