1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Fix a const_cast related warning in GCC in the C API for libLTO

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 263870
This commit is contained in:
Mehdi Amini 2016-03-19 01:24:23 +00:00
parent 0aec67d31c
commit 68b4968481

View File

@ -469,7 +469,7 @@ LTOObjectBuffer thinlto_module_get_object(thinlto_code_gen_t cg,
unsigned int index) {
assert(index < unwrap(cg)->getProducedBinaries().size() && "Index overflow");
auto &MemBuffer = unwrap(cg)->getProducedBinaries()[index];
return LTOObjectBuffer{(void *)MemBuffer->getBufferStart(),
return LTOObjectBuffer{const_cast<char *>(MemBuffer->getBufferStart()),
MemBuffer->getBufferSize()};
}