Silencing a -Wcast-qual warning. NFC.
llvm-svn: 216068
diff --git a/llvm/lib/LTO/LTOModule.cpp b/llvm/lib/LTO/LTOModule.cpp
index 083af9e..d9bc939 100644
--- a/llvm/lib/LTO/LTOModule.cpp
+++ b/llvm/lib/LTO/LTOModule.cpp
@@ -104,7 +104,7 @@
LTOModule *LTOModule::createFromBuffer(const void *mem, size_t length,
TargetOptions options,
std::string &errMsg, StringRef path) {
- StringRef Data((char *)mem, length);
+ StringRef Data((const char *)mem, length);
MemoryBufferRef Buffer(Data, path);
return makeLTOModule(Buffer, options, errMsg);
}