diff options
author | Youngsuk Kim <joseph942010@gmail.com> | 2023-11-13 10:06:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 10:06:39 -0500 |
commit | 2a47f4ae457b80475058db356d4c0014d5f7f68c (patch) | |
tree | 2e74315920906bc41687f710d454fb30c2865823 /clang | |
parent | 0a0e06f29145213e90de88ca39f7b505ce092a4a (diff) | |
download | llvm-2a47f4ae457b80475058db356d4c0014d5f7f68c.zip llvm-2a47f4ae457b80475058db356d4c0014d5f7f68c.tar.gz llvm-2a47f4ae457b80475058db356d4c0014d5f7f68c.tar.bz2 |
[clang][CGExprScalar] Remove no-op ptr-to-ptr bitcast (NFC) (#72072)
Remove bitcast added back in dcd74716f9d18 .
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 05a3c80..3784373 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -2224,18 +2224,8 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return Visit(const_cast<Expr*>(E)); case CK_NoOp: { - llvm::Value *V = CE->changesVolatileQualification() - ? EmitLoadOfLValue(CE) - : Visit(const_cast<Expr *>(E)); - if (V) { - // CK_NoOp can model a pointer qualification conversion, which can remove - // an array bound and change the IR type. - // FIXME: Once pointee types are removed from IR, remove this. - llvm::Type *T = ConvertType(DestTy); - if (T != V->getType()) - V = Builder.CreateBitCast(V, T); - } - return V; + return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) + : Visit(const_cast<Expr *>(E)); } case CK_BaseToDerived: { |