summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/compilation_unit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler_llvm/compilation_unit.h')
-rw-r--r--src/compiler_llvm/compilation_unit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler_llvm/compilation_unit.h b/src/compiler_llvm/compilation_unit.h
index eb92ce445a..1db54fc413 100644
--- a/src/compiler_llvm/compilation_unit.h
+++ b/src/compiler_llvm/compilation_unit.h
@@ -73,6 +73,11 @@ class CompilationUnit {
return ElfImage(elf_image_);
}
+ uint16_t AcquireUniqueElfFuncIndex() {
+ CHECK(num_elf_funcs_ < UINT16_MAX);
+ return num_elf_funcs_++;
+ }
+
bool WriteBitcodeToFile();
bool Materialize();
@@ -101,6 +106,7 @@ class CompilationUnit {
std::string bitcode_filename_;
size_t mem_usage_;
+ uint16_t num_elf_funcs_;
};
} // namespace compiler_llvm