Fix -Wcast-qual warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-04-19 15:42:05 +00:00
parent 5af8f421b6
commit dfd4bbfdfb
3 changed files with 11 additions and 6 deletions

View File

@@ -241,7 +241,7 @@ llvm::GetBitcodeSymbols(const unsigned char *BufPtr, unsigned Length,
// Get the module.
std::auto_ptr<MemoryBuffer> Buffer(
MemoryBuffer::getNewMemBuffer(Length, ModuleID.c_str()));
memcpy((char*)Buffer->getBufferStart(), BufPtr, Length);
memcpy(const_cast<char *>(Buffer->getBufferStart()), BufPtr, Length);
Module *M = ParseBitcodeFile(Buffer.get(), Context, ErrMsg);
if (!M)