diff options
-rw-r--r-- | compiler/elf_writer_mclinker.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/elf_writer_mclinker.cc b/compiler/elf_writer_mclinker.cc index e56f5f894..c7baf4f3e 100644 --- a/compiler/elf_writer_mclinker.cc +++ b/compiler/elf_writer_mclinker.cc @@ -265,12 +265,12 @@ void ElfWriterMclinker::AddCompiledCodeInput(const CompiledCode& compiled_code) added_symbols_.Put(&symbol, &symbol); // Add input to supply code for symbol - const std::vector<uint8_t>& code = compiled_code.GetPortableCode(); + const std::vector<uint8_t>* code = compiled_code.GetPortableCode(); // TODO: ownership of code_input? // TODO: why does IRBuilder::ReadInput take a non-const pointer? mcld::Input* code_input = ir_builder_->ReadInput(symbol, - const_cast<uint8_t*>(&code[0]), - code.size()); + const_cast<uint8_t*>(&(*code)[0]), + code->size()); CHECK(code_input != NULL); } |