Now that the default for Darwin platforms is to place the LSDA into the TEXT
[oota-llvm.git] / lib / Target / X86 / X86TargetObjectFile.h
1 //===-- llvm/Target/X86/X86TargetObjectFile.h - X86 Object Info -*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_TARGET_X86_TARGETOBJECTFILE_H
11 #define LLVM_TARGET_X86_TARGETOBJECTFILE_H
12
13 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
14 #include "llvm/Target/TargetMachine.h"
15 #include "llvm/Target/TargetLoweringObjectFile.h"
16
17 namespace llvm {
18   class X86TargetMachine;
19
20   /// X8664_MachoTargetObjectFile - This TLOF implementation is used for Darwin
21   /// x86-64.
22   class X8664_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
23   public:
24     virtual const MCExpr *
25     getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
26                                    MachineModuleInfo *MMI, unsigned Encoding,
27                                    MCStreamer &Streamer) const;
28   };
29
30   class X8632_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
31     const X86TargetMachine &TM;
32   public:
33     X8632_ELFTargetObjectFile(const X86TargetMachine &tm)
34       :TM(tm) { }
35     virtual unsigned getPersonalityEncoding() const;
36     virtual unsigned getLSDAEncoding() const;
37     virtual unsigned getFDEEncoding() const;
38     virtual unsigned getTTypeEncoding() const;
39   };
40
41   class X8664_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
42     const X86TargetMachine &TM;
43   public:
44     X8664_ELFTargetObjectFile(const X86TargetMachine &tm)
45       :TM(tm) { }
46     virtual unsigned getPersonalityEncoding() const;
47     virtual unsigned getLSDAEncoding() const;
48     virtual unsigned getFDEEncoding() const;
49     virtual unsigned getTTypeEncoding() const;
50   };
51
52 } // end namespace llvm
53
54 #endif