]> granicus.if.org Git - llvm/commitdiff
MSan: remove an unnecessary cast. NFC for userspace instrumenetation.
authorAlexander Potapenko <glider@google.com>
Thu, 23 Nov 2017 15:06:51 +0000 (15:06 +0000)
committerAlexander Potapenko <glider@google.com>
Thu, 23 Nov 2017 15:06:51 +0000 (15:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318923 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/MemorySanitizer.cpp

index 30b15195e8c269566a2d9019354a96ae02846771..44190a2c312d161918e85d4cf13f08c40ec7bf4f 100644 (file)
@@ -1076,9 +1076,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
 
   /// \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.