Fix a gcc warning.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Oct 2014 02:23:31 +0000 (02:23 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 22 Oct 2014 02:23:31 +0000 (02:23 +0000)
Thanks to Filipe Cabecinhas for the report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220361 91177308-0d34-0410-b5e6-96231b3b80d8

tools/gold/gold-plugin.cpp

index bb0488a..f65cdf2 100644 (file)
@@ -278,7 +278,7 @@ static ld_plugin_status claim_file_hook(const ld_plugin_input_file *file,
       message(LDPL_ERROR, "Failed to get a view of %s", file->name);
       return LDPS_ERR;
     }
-    BufferRef = MemoryBufferRef(StringRef((char *)view, file->filesize), "");
+    BufferRef = MemoryBufferRef(StringRef((const char *)view, file->filesize), "");
   } else {
     int64_t offset = 0;
     // Gold has found what might be IR part-way inside of a file, such as