Skip to content

Commit bd84f5d

Browse files
committed
clang: Remove unnecessary pointer bitcast
1 parent c88b84d commit bd84f5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/CGExprScalar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value *Src, QualType SrcType,
15401540
if (auto DstPT = dyn_cast<llvm::PointerType>(DstTy)) {
15411541
// The source value may be an integer, or a pointer.
15421542
if (isa<llvm::PointerType>(SrcTy))
1543-
return Builder.CreateBitCast(Src, DstTy, "conv");
1543+
return Src;
15441544

15451545
assert(SrcType->isIntegerType() && "Not ptr->ptr or int->ptr conversion?");
15461546
// First, convert to the correct width so that we control the kind of

0 commit comments

Comments
 (0)