From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263870
91177308-0d34-0410-b5e6-
96231b3b80d8
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()};
}