Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 034b8f9

Browse files
committed
Trivial cleanup: reuse existing variable.
Extracted while trying to understand http://llvm-reviews.chandlerc.com/D1764. Patch by Matt Arsenault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201425 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent e228078 commit 034b8f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Transforms/Scalar/SROA.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -2518,8 +2518,7 @@ class AllocaSliceRewriter : public InstVisitor<AllocaSliceRewriter, bool> {
25182518
}
25192519

25202520
if (EmitMemCpy) {
2521-
Type *OtherPtrTy = IsDest ? II.getRawSource()->getType()
2522-
: II.getRawDest()->getType();
2521+
Type *OtherPtrTy = OtherPtr->getType();
25232522

25242523
// Compute the other pointer, folding as much as possible to produce
25252524
// a single, simple GEP in most cases.

0 commit comments

Comments
 (0)