Start the ELF function index from 1 instead of 0.
It will be much easier to debug if 0 is an invalid ELF
function index.
Change-Id: Ib1035fe461b2515c8e32e2cb5f0d52bcc9d4e6b5
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index 55c7edb..b635dd0 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -127,7 +127,7 @@
LlvmCompilationUnit* CompilerLLVM::AllocateCompilationUnit() {
MutexLock GUARD(Thread::Current(), num_cunits_lock_);
- LlvmCompilationUnit* cunit = new LlvmCompilationUnit(this, num_cunits_++);
+ LlvmCompilationUnit* cunit = new LlvmCompilationUnit(this, ++num_cunits_);
if (!bitcode_filename_.empty()) {
cunit->SetBitcodeFileName(StringPrintf("%s-%zu", bitcode_filename_.c_str(), cunit->GetIndex()));
}