mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
[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:
committed by
Youngsuk Kim
parent
4b1fe097f9
commit
d8c40800ed
@@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user