Merge iceland to greenland.
Change-Id: Ic4440a658bb2fccb558024a736d896baaf172f3c
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index dc79643..3a1bebc 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -116,7 +116,11 @@
CompilationUnit* CompilerLLVM::AllocateCompilationUnit() {
MutexLock GUARD(num_cunits_lock_);
- return new CompilationUnit(this, num_cunits_++);
+ CompilationUnit* cunit = new CompilationUnit(this, num_cunits_++);
+ if (!bitcode_filename_.empty()) {
+ cunit->SetBitcodeFileName(StringPrintf("%s-%zu", bitcode_filename_.c_str(), num_cunits_-1));
+ }
+ return cunit;
}