Fixup for r180094: properly use MSan interface functions
authorAlexey Samsonov <samsonov@google.com>
Tue, 23 Apr 2013 13:35:32 +0000 (13:35 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 23 Apr 2013 13:35:32 +0000 (13:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180103 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Compression.cpp

index 36afa8c06b14287b724af4d540c20b1c132374e9..fd8a8743ea180aca3a859cd37049610d9f3ffaeb 100644 (file)
@@ -60,7 +60,7 @@ zlib::Status zlib::compress(StringRef InputBuffer,
     CompressedBuffer.reset(MemoryBuffer::getMemBufferCopy(
         StringRef(TmpBuffer.get(), CompressedSize)));
     // Tell MSan that memory initialized by zlib is valid.
-    __msan_unpoison(CompressedBuffer.data(), CompressedBuffer.size());
+    __msan_unpoison(CompressedBuffer->getBufferStart(), CompressedSize);
   }
   return Res;
 }
@@ -76,7 +76,7 @@ zlib::Status zlib::uncompress(StringRef InputBuffer,
     UncompressedBuffer.reset(MemoryBuffer::getMemBufferCopy(
         StringRef(TmpBuffer.get(), UncompressedSize)));
     // Tell MSan that memory initialized by zlib is valid.
-    __msan_unpoison(UncompressedBuffer.data(), UncompressedBuffer.size());
+    __msan_unpoison(UncompressedBuffer->getBufferStart(), UncompressedSize);
   }
   return Res;
 }