diff options
author | Nate Begeman <natebegeman@mac.com> | 2010-01-15 18:51:18 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2010-01-15 18:51:18 +0000 |
commit | d232150b83cf226ec62fdb2c7be642065a25c2d0 (patch) | |
tree | 6302114fda2221ba15c32844c8c87337c935e547 /llvm/lib/CodeGen/MachOCodeEmitter.h | |
parent | a2bbb7cbc636595bd24fc106ffe7df9757614b87 (diff) | |
download | bcm5719-llvm-d232150b83cf226ec62fdb2c7be642065a25c2d0.tar.gz bcm5719-llvm-d232150b83cf226ec62fdb2c7be642065a25c2d0.zip |
Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer
Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.
llvm-svn: 93527
Diffstat (limited to 'llvm/lib/CodeGen/MachOCodeEmitter.h')
-rw-r--r-- | llvm/lib/CodeGen/MachOCodeEmitter.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/llvm/lib/CodeGen/MachOCodeEmitter.h b/llvm/lib/CodeGen/MachOCodeEmitter.h deleted file mode 100644 index 475244646bd..00000000000 --- a/llvm/lib/CodeGen/MachOCodeEmitter.h +++ /dev/null @@ -1,69 +0,0 @@ -//===-- MachOEmitter.h - Target-independent Mach-O Emitter class ----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef MACHOCODEEMITTER_H -#define MACHOCODEEMITTER_H - -#include "llvm/CodeGen/ObjectCodeEmitter.h" -#include <map> - -namespace llvm { - -class MachOWriter; - -/// MachOCodeEmitter - This class is used by the MachOWriter to emit the code -/// for functions to the Mach-O file. - -class MachOCodeEmitter : public ObjectCodeEmitter { - MachOWriter &MOW; - - /// Target machine description. - TargetMachine &TM; - - /// is64Bit/isLittleEndian - This information is inferred from the target - /// machine directly, indicating what header values and flags to set. - bool is64Bit, isLittleEndian; - - const MCAsmInfo *MAI; - - /// Relocations - These are the relocations that the function needs, as - /// emitted. - std::vector<MachineRelocation> Relocations; - - std::map<uint64_t, uintptr_t> Labels; - -public: - MachOCodeEmitter(MachOWriter &mow, MachOSection &mos); - - virtual void startFunction(MachineFunction &MF); - virtual bool finishFunction(MachineFunction &MF); - - virtual void addRelocation(const MachineRelocation &MR) { - Relocations.push_back(MR); - } - - void emitConstantPool(MachineConstantPool *MCP); - void emitJumpTables(MachineJumpTableInfo *MJTI); - - virtual void emitLabel(uint64_t LabelID) { - Labels[LabelID] = getCurrentPCOffset(); - } - - virtual uintptr_t getLabelAddress(uint64_t Label) const { - return Labels.find(Label)->second; - } - - virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { } - -}; // end class MachOCodeEmitter - -} // end namespace llvm - -#endif - |