[clang][CGExprConstant] Remove no-op ptr-to-ptr bitcast (NFC)

Remove a call to `getPointerCast` which is effectively does a no-op ptr-to-ptr
bitcast.

Opaque ptr clean-up effort.
This commit is contained in:
Youngsuk Kim
2023-11-23 04:21:02 -05:00
committed by Youngsuk Kim
parent 4b1fe097f9
commit d8c40800ed

View File

@@ -1861,10 +1861,7 @@ private:
if (!hasNonZeroOffset())
return C;
llvm::Type *origPtrTy = C->getType();
C = llvm::ConstantExpr::getGetElementPtr(CGM.Int8Ty, C, getOffset());
C = llvm::ConstantExpr::getPointerCast(C, origPtrTy);
return C;
return llvm::ConstantExpr::getGetElementPtr(CGM.Int8Ty, C, getOffset());
}
};