[Support] Fix Wcast-qual warning
authorVedant Kumar <vsk@apple.com>
Thu, 21 Apr 2016 22:40:59 +0000 (22:40 +0000)
committerVedant Kumar <vsk@apple.com>
Thu, 21 Apr 2016 22:40:59 +0000 (22:40 +0000)
llvm-svn: 267072

llvm/include/llvm/Support/SHA1.h

index 896a610..8347a71 100644 (file)
@@ -37,7 +37,8 @@ public:
 
   /// Digest more data.
   void update(StringRef Str) {
-    update(ArrayRef<uint8_t>((uint8_t *)Str.data(), Str.size()));
+    update(ArrayRef<uint8_t>((uint8_t *)const_cast<char *>(Str.data()),
+                             Str.size()));
   }
 
   /// Return a reference to the current raw 160-bits SHA1 for the digested data