diff options
author | ed <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-27 10:44:33 +0000 |
commit | cf5cd875b51255602afaed29deb636b66b295671 (patch) | |
tree | 9794dc36f22f2a2b3f8063829d8a9b3a7794acc8 /lib/CodeGen/ELFCodeEmitter.h | |
parent | 5c1b5c146f3df07c75174aff06c3bb0968f6857e (diff) | |
download | FreeBSD-src-cf5cd875b51255602afaed29deb636b66b295671.zip FreeBSD-src-cf5cd875b51255602afaed29deb636b66b295671.tar.gz |
Import LLVM r74383.
Diffstat (limited to 'lib/CodeGen/ELFCodeEmitter.h')
-rw-r--r-- | lib/CodeGen/ELFCodeEmitter.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/CodeGen/ELFCodeEmitter.h b/lib/CodeGen/ELFCodeEmitter.h index c0289da..c309ef7 100644 --- a/lib/CodeGen/ELFCodeEmitter.h +++ b/lib/CodeGen/ELFCodeEmitter.h @@ -31,6 +31,14 @@ namespace llvm { /// emitted. std::vector<MachineRelocation> Relocations; + /// CPLocations - This is a map of constant pool indices to offsets from the + /// start of the section for that constant pool index. + std::vector<uintptr_t> CPLocations; + + /// CPSections - This is a map of constant pool indices to the MachOSection + /// containing the constant pool entry for that index. + std::vector<unsigned> CPSections; + /// MBBLocations - This vector is a mapping from MBB ID's to their address. /// It is filled in by the StartMachineBasicBlock callback and queried by /// the getMachineBasicBlockAddress callback. @@ -62,9 +70,10 @@ namespace llvm { } virtual uintptr_t getConstantPoolEntryAddress(unsigned Index) const { - assert(0 && "CP not implementated yet!"); - return 0; + assert(CPLocations.size() > Index && "CP not emitted!"); + return CPLocations[Index]; } + virtual uintptr_t getJumpTableEntryAddress(unsigned Index) const { assert(0 && "JT not implementated yet!"); return 0; @@ -86,6 +95,10 @@ namespace llvm { abort(); } + /// emitConstantPool - For each constant pool entry, figure out which section + /// the constant should live in and emit the constant. + void emitConstantPool(MachineConstantPool *MCP); + virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { } /// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE! |