Use the same encoding for EH stuff uniformly on all MachO targets.
[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   /// X8632_MachoTargetObjectFile - This TLOF implementation is used for
21   /// Darwin/x86-32.
22   class X8632_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
23   public:
24
25     virtual const MCExpr *
26     getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
27                               MachineModuleInfo *MMI, unsigned Encoding) const;
28   };
29
30   /// X8664_MachoTargetObjectFile - This TLOF implementation is used for
31   /// Darwin/x86-64.
32   class X8664_MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
33   public:
34
35     virtual const MCExpr *
36     getSymbolForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang,
37                               MachineModuleInfo *MMI, unsigned Encoding) const;
38   };
39
40   class X8632_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
41     const X86TargetMachine &TM;
42   public:
43     X8632_ELFTargetObjectFile(const X86TargetMachine &tm)
44       :TM(tm) { }
45     virtual unsigned getPersonalityEncoding() const;
46     virtual unsigned getLSDAEncoding() const;
47     virtual unsigned getFDEEncoding() const;
48     virtual unsigned getTTypeEncoding() const;
49   };
50
51   class X8664_ELFTargetObjectFile : public TargetLoweringObjectFileELF {
52     const X86TargetMachine &TM;
53   public:
54     X8664_ELFTargetObjectFile(const X86TargetMachine &tm)
55       :TM(tm) { }
56     virtual unsigned getPersonalityEncoding() const;
57     virtual unsigned getLSDAEncoding() const;
58     virtual unsigned getFDEEncoding() const;
59     virtual unsigned getTTypeEncoding() const;
60   };
61
62 } // end namespace llvm
63
64 #endif