summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/compiler_llvm.cc
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-06-28 21:21:45 -0700
committer Shih-wei Liao <sliao@google.com> 2012-09-15 04:15:17 -0700
commitb672d1e48b6e02bb69c7cd9bcfa7509c81514c07 (patch)
tree1731b6e1818a90136a985fa0957bf5ebc96eaf7d /src/compiler_llvm/compiler_llvm.cc
parent21d28f510eb590f52810c83f1f3f37fe5f4adf46 (diff)
Merge iceland to greenland.
Change-Id: Ic4440a658bb2fccb558024a736d896baaf172f3c
Diffstat (limited to 'src/compiler_llvm/compiler_llvm.cc')
-rw-r--r--src/compiler_llvm/compiler_llvm.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index dc796434df..3a1bebcd2e 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -116,7 +116,11 @@ CompilerLLVM::~CompilerLLVM() {
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;
}