[llvm-commits] CVS: reopt/include/reopt/Inst/ElfReader.h

Brian Gaeke gaeke at cs.uiuc.edu
Wed Nov 19 16:52:07 PST 2003


Changes in directory reopt/include/reopt/Inst:

ElfReader.h updated: 1.9 -> 1.10

---
Log message:

Put reoptimizer code into 'llvm' namespace.
Other minor cleanups.


---
Diffs of the changes:  (+31 -14)

Index: reopt/include/reopt/Inst/ElfReader.h
diff -u reopt/include/reopt/Inst/ElfReader.h:1.9 reopt/include/reopt/Inst/ElfReader.h:1.10
--- reopt/include/reopt/Inst/ElfReader.h:1.9	Mon Sep 15 00:28:00 2003
+++ reopt/include/reopt/Inst/ElfReader.h	Wed Nov 19 16:51:45 2003
@@ -1,18 +1,30 @@
-////////////////
-// programmer: Joel Stanley
-//       date: Fri Mar 21 16:11:07 CST 2003
-//     fileid: ElfReader.h
-//    purpose: Clients may provide a filename to the constructor (must be either an ELF
-//    object file or an archive of ELF object files) and make subsequent calls to
-//    findNextSymbol() to iterate over ELF symbol table contents.
-// []
+//===- ElfReader.h - ELF object file reader interface -----------*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
+//
+// Originally written by Joel Stanley on 21-Mar-2003. Interface to ELF
+// object file reader in lib/Inst. Clients may provide a filename to
+// the constructor (must be either an ELF object file or an archive of
+// ELF object files) and make subsequent calls to findNextSymbol() to
+// iterate over ELF symbol table contents.
+// 
+//===----------------------------------------------------------------------===//
 
-#ifndef _INCLUDED_ELFREADER_H
-#define _INCLUDED_ELFREADER_H
+#ifndef ELFREADER_H
+#define ELFREADER_H
 
 #include "Support/DataTypes.h"
+#include <string>
+#include <iostream>
 #include <libelf.h>
 
+namespace llvm {
+
 class ElfReader 
 {
   public:
@@ -38,13 +50,18 @@
     Elf64_Ehdr*   m_pElfHdr;     // Current ELF header
     Elf64_Shdr*   m_pSymHdr;     // Section header of current symtable
     Elf_Scn*      m_pSymSec;     // Section descriptor for current symtable
-    char*         m_pStrTab;     // String table of symbol names for current symtable
-    char*         m_pSecNameTab; // String table of section names for current file
+    // String table of symbol names for current symtable
+    char*         m_pStrTab;
+    // String table of section names for current file
+    char*         m_pSecNameTab;
     Elf64_Sym*    m_pCurrSym;    // The current symtable entry
     Elf64_Sym*    m_pSymEnd;     // The end of the current symtable
-    unsigned      m_codeSecIdx;  // Section index of code section in current object file
+    // Section index of code section in current object file
+    unsigned      m_codeSecIdx;
 
     static const std::string sm_codeSegmentName;
 };
 
-#endif // _INCLUDED_ELFREADER_H
+} // end namespace llvm
+
+#endif // ELFREADER_H





More information about the llvm-commits mailing list