From 9e5477f4734ba85256a6508a54a200fa2aaf6ddf Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 23 Nov 2017 15:06:51 +0000 Subject: MSan: remove an unnecessary cast. NFC for userspace instrumenetation. llvm-svn: 318923 --- llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 30b15195e8c..44190a2c312 100644 --- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -1076,9 +1076,9 @@ struct MemorySanitizerVisitor : public InstVisitor { /// \brief Compute the shadow address for a retval. Value *getShadowPtrForRetval(Value *A, IRBuilder<> &IRB) { - Value *Base = IRB.CreatePointerCast(MS.RetvalTLS, MS.IntptrTy); - return IRB.CreateIntToPtr(Base, PointerType::get(getShadowTy(A), 0), - "_msret"); + return IRB.CreatePointerCast(MS.RetvalTLS, + PointerType::get(getShadowTy(A), 0), + "_msret"); } /// \brief Compute the origin address for a retval. -- cgit v1.2.3