[llvm] r267072 - [Support] Fix Wcast-qual warning

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 15:41:00 PDT 2016


Author: vedantk
Date: Thu Apr 21 17:40:59 2016
New Revision: 267072

URL: http://llvm.org/viewvc/llvm-project?rev=267072&view=rev
Log:
[Support] Fix Wcast-qual warning

Modified:
    llvm/trunk/include/llvm/Support/SHA1.h

Modified: llvm/trunk/include/llvm/Support/SHA1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SHA1.h?rev=267072&r1=267071&r2=267072&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/SHA1.h (original)
+++ llvm/trunk/include/llvm/Support/SHA1.h Thu Apr 21 17:40:59 2016
@@ -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




More information about the llvm-commits mailing list