mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 01:11:44 +00:00
Const-correctness in libLTO
Looks like I was sloppy when bridging to C. Thanks D. Blaikie for noticing! From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263885
This commit is contained in:
parent
220b2c4d1d
commit
addc8d5410
@ -564,7 +564,7 @@ lto_codegen_set_should_embed_uselists(lto_code_gen_t cg,
|
||||
* \since LTO_API_VERSION=18
|
||||
*/
|
||||
typedef struct {
|
||||
void *Buffer;
|
||||
const char *Buffer;
|
||||
size_t Size;
|
||||
} LTOObjectBuffer;
|
||||
|
||||
|
@ -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{const_cast<char *>(MemBuffer->getBufferStart()),
|
||||
return LTOObjectBuffer{MemBuffer->getBufferStart(),
|
||||
MemBuffer->getBufferSize()};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user