summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/elf_writer_mclinker.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/elf_writer_mclinker.cc b/compiler/elf_writer_mclinker.cc
index 3c3d09eac5..c7baf4f3e5 100644
--- a/compiler/elf_writer_mclinker.cc
+++ b/compiler/elf_writer_mclinker.cc
@@ -269,8 +269,8 @@ void ElfWriterMclinker::AddCompiledCodeInput(const CompiledCode& compiled_code)
// 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);
}