| OLD | NEW |
| 1 //===-- ELFWriter.h - Target-independent ELF writer support -----*- C++ -*-===// | 1 //===-- ELFWriter.h - Target-independent ELF writer support -----*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines the ELFWriter class. | 10 // This file defines the ELFWriter class. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace llvm { | 21 namespace llvm { |
| 22 class BinaryObject; | 22 class BinaryObject; |
| 23 class Constant; | 23 class Constant; |
| 24 class ConstantInt; | 24 class ConstantInt; |
| 25 class ConstantStruct; | 25 class ConstantStruct; |
| 26 class ELFCodeEmitter; | 26 class ELFCodeEmitter; |
| 27 class ELFRelocation; | 27 class ELFRelocation; |
| 28 class ELFSection; | 28 class ELFSection; |
| 29 struct ELFSym; | 29 struct ELFSym; |
| 30 class GlobalVariable; | 30 class GlobalVariable; |
| 31 class JITDebugRegisterer; |
| 31 class Mangler; | 32 class Mangler; |
| 32 class MachineCodeEmitter; | 33 class MachineCodeEmitter; |
| 33 class MachineConstantPoolEntry; | 34 class MachineConstantPoolEntry; |
| 34 class ObjectCodeEmitter; | 35 class ObjectCodeEmitter; |
| 35 class MCAsmInfo; | 36 class MCAsmInfo; |
| 36 class TargetELFWriterInfo; | 37 class TargetELFWriterInfo; |
| 37 class TargetLoweringObjectFile; | 38 class TargetLoweringObjectFile; |
| 38 class raw_ostream; | 39 class raw_ostream; |
| 39 class SectionKind; | 40 class SectionKind; |
| 40 class MCContext; | 41 class MCContext; |
| 41 | 42 |
| 42 typedef std::vector<ELFSym*>::iterator ELFSymIter; | 43 typedef std::vector<ELFSym*>::iterator ELFSymIter; |
| 43 typedef std::vector<ELFSection*>::iterator ELFSectionIter; | 44 typedef std::vector<ELFSection*>::iterator ELFSectionIter; |
| 44 typedef SetVector<const GlobalValue*>::const_iterator PendingGblsIter; | 45 typedef SetVector<const GlobalValue*>::const_iterator PendingGblsIter; |
| 45 typedef SetVector<const char *>::const_iterator PendingExtsIter; | 46 typedef SetVector<const char *>::const_iterator PendingExtsIter; |
| 46 typedef std::pair<const Constant *, int64_t> CstExprResTy; | 47 typedef std::pair<const Constant *, int64_t> CstExprResTy; |
| 47 | 48 |
| 48 /// ELFWriter - This class implements the common target-independent code for | 49 /// ELFWriter - This class implements the common target-independent code for |
| 49 /// writing ELF files. Targets should derive a class from this to | 50 /// writing ELF files. Targets should derive a class from this to |
| 50 /// parameterize the output format. | 51 /// parameterize the output format. |
| 51 /// | 52 /// |
| 52 class ELFWriter : public MachineFunctionPass { | 53 class ELFWriter : public MachineFunctionPass { |
| 53 friend class ELFCodeEmitter; | 54 friend class ELFCodeEmitter; |
| 55 friend class JITDebugRegisterer; |
| 54 public: | 56 public: |
| 55 static char ID; | 57 static char ID; |
| 56 | 58 |
| 57 /// Return the ELFCodeEmitter as an instance of ObjectCodeEmitter | 59 /// Return the ELFCodeEmitter as an instance of ObjectCodeEmitter |
| 58 ObjectCodeEmitter *getObjectCodeEmitter() { | 60 ObjectCodeEmitter *getObjectCodeEmitter() { |
| 59 return reinterpret_cast<ObjectCodeEmitter*>(ElfCE); | 61 return reinterpret_cast<ObjectCodeEmitter*>(ElfCE); |
| 60 } | 62 } |
| 61 | 63 |
| 62 ELFWriter(raw_ostream &O, TargetMachine &TM); | 64 ELFWriter(raw_ostream &O, TargetMachine &TM); |
| 63 ~ELFWriter(); | 65 ~ELFWriter(); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 void EmitStringTable(const std::string &ModuleName); | 241 void EmitStringTable(const std::string &ModuleName); |
| 240 void OutputSectionsAndSectionTable(); | 242 void OutputSectionsAndSectionTable(); |
| 241 void RelocateField(BinaryObject &BO, uint32_t Offset, int64_t Value, | 243 void RelocateField(BinaryObject &BO, uint32_t Offset, int64_t Value, |
| 242 unsigned Size); | 244 unsigned Size); |
| 243 unsigned SortSymbols(); | 245 unsigned SortSymbols(); |
| 244 CstExprResTy ResolveConstantExpr(const Constant *CV); | 246 CstExprResTy ResolveConstantExpr(const Constant *CV); |
| 245 }; | 247 }; |
| 246 } | 248 } |
| 247 | 249 |
| 248 #endif | 250 #endif |
| OLD | NEW |