[llvm-commits] CVS: llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp

Joel Stanley jstanley at cs.uiuc.edu
Sun May 4 14:58:01 PDT 2003


Changes in directory llvm/lib/Reoptimizer/Inst/lib:

ElfReader.cpp updated: 1.9 -> 1.10

---
Log message:





---
Diffs of the changes:

Index: llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp
diff -u llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp:1.9 llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp:1.10
--- llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp:1.9	Sun May  4 15:01:30 2003
+++ llvm/lib/Reoptimizer/Inst/lib/ElfReader.cpp	Sun May  4 15:05:19 2003
@@ -6,14 +6,6 @@
 //    that special care is taken to ensure that archive files are treated the same as
 //    single object files.
 //
-// TODO:
-//
-// Replace the primitive raw-FD read()-based mechanism with C++-stream-based
-// code.  The version of libg++ we're using doesn't seem to have a mechanism for
-// obtaining the file descriptor associated with an open ifstream. (rdbuf() will
-// yield the file buffer object, but there's no way to get the associated file
-// and therefore the FD from that. :(
-//
 // []
 
 #include <ar.h>
@@ -40,7 +32,7 @@
 
 const std::string ElfReader::sm_codeSegmentName = ".text";
 
-ElfReader::ElfReader(const char* execName):
+ElfReader::ElfReader(const char* filename):
     m_fd(-1),
     m_pPrimaryElf(0),
     m_pCurrElf(0),
@@ -53,7 +45,7 @@
     m_pCurrSym(0),
     m_pSymEnd(0)
 {
-    m_fd = open(execName, O_RDONLY);
+    m_fd = open(filename, O_RDONLY);
     assert(m_fd != -1 && "Failed to open executable image");
 
     if(elf_version(EV_CURRENT) == EV_NONE) {





More information about the llvm-commits mailing list