Remove ELF filename argument.

We are embedding the ELF image in the Oat file.  We don't
need ELF filename anymore.

(cherry picked from commit b245ccacf447b014838535a7d8a58365642f0c3d)

Change-Id: I235429222401100c09381ba44a3978f38d5b499c
diff --git a/src/compiler_llvm/compilation_unit.cc b/src/compiler_llvm/compilation_unit.cc
index b73e997..3b4defd 100644
--- a/src/compiler_llvm/compilation_unit.cc
+++ b/src/compiler_llvm/compilation_unit.cc
@@ -194,16 +194,7 @@
     pm.run(*module_);
   }
 
-  // Write ELF image to file
-  // TODO: Remove this when we can embed the ELF image in the Oat file.
-  // We are keeping these code to run the unit test.
-  llvm::OwningPtr<llvm::tool_output_file> out_file(
-    new llvm::tool_output_file(elf_filename_.c_str(), errmsg,
-                               llvm::raw_fd_ostream::F_Binary));
-  out_file->os().write(elf_image_.data(), elf_image_.size());
-  out_file->keep();
-
-  LOG(INFO) << "ELF: " << elf_filename_ << " (done)";
+  LOG(INFO) << "Compilation Unit: " << elf_idx_ << " (done)";
 
   // Free the resources
   context_.reset(NULL);
diff --git a/src/compiler_llvm/compilation_unit.h b/src/compiler_llvm/compilation_unit.h
index 659bc64..57d559b 100644
--- a/src/compiler_llvm/compilation_unit.h
+++ b/src/compiler_llvm/compilation_unit.h
@@ -61,18 +61,10 @@
     return irb_.get();
   }
 
-  std::string const& GetElfFileName() const {
-    return elf_filename_;
-  }
-
   std::string const& GetBitcodeFileName() const {
     return bitcode_filename_;
   }
 
-  void SetElfFileName(std::string const& filename) {
-    elf_filename_ = filename;
-  }
-
   void SetBitcodeFileName(std::string const& filename) {
     bitcode_filename_ = filename;
   }
@@ -106,7 +98,6 @@
   llvm::Module* module_;
 
   std::string elf_image_;
-  std::string elf_filename_;
   std::string bitcode_filename_;
 
   size_t mem_usage_;
diff --git a/src/compiler_llvm/compiler_llvm.cc b/src/compiler_llvm/compiler_llvm.cc
index e02c913..a646b6f 100644
--- a/src/compiler_llvm/compiler_llvm.cc
+++ b/src/compiler_llvm/compiler_llvm.cc
@@ -125,10 +125,7 @@
 
   curr_cunit_ = new CompilationUnit(insn_set_, cunit_idx);
 
-  // Setup output filename
-  curr_cunit_->SetElfFileName(
-    StringPrintf("%s-%zu", elf_filename_.c_str(), cunit_idx));
-
+  // Setup bitcode output filename
   if (IsBitcodeFileNameAvailable()) {
     curr_cunit_->SetBitcodeFileName(
       StringPrintf("%s-%zu", bitcode_filename_.c_str(), cunit_idx));
@@ -337,11 +334,6 @@
   return ContextOf(compiler)->CreateInvokeStub(is_static, shorty);
 }
 
-extern "C" void compilerLLVMSetElfFileName(art::Compiler& compiler,
-                                           std::string const& filename) {
-  ContextOf(compiler)->SetElfFileName(filename);
-}
-
 extern "C" void compilerLLVMSetBitcodeFileName(art::Compiler& compiler,
                                                std::string const& filename) {
   ContextOf(compiler)->SetBitcodeFileName(filename);
diff --git a/src/compiler_llvm/compiler_llvm.h b/src/compiler_llvm/compiler_llvm.h
index 90537ff..2c37ac0 100644
--- a/src/compiler_llvm/compiler_llvm.h
+++ b/src/compiler_llvm/compiler_llvm.h
@@ -83,10 +83,6 @@
     return cunits_[i];
   }
 
-  void SetElfFileName(std::string const& filename) {
-    elf_filename_ = filename;
-  }
-
   void SetBitcodeFileName(std::string const& filename) {
     bitcode_filename_ = filename;
   }
@@ -135,8 +131,6 @@
 
   std::vector<CompilationUnit*> cunits_;
 
-  std::string elf_filename_;
-
   std::string bitcode_filename_;
 
   UniquePtr<ElfLoader> elf_loader_;