blob: 45739475f8d7ea516b8ab45c303c8d48ce1d6160 [file] [log] [blame]
Jia Liub22310f2012-02-18 12:03:15 +00001//===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
Chris Lattnerb8666022009-09-16 01:46:41 +00002//
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
Anton Korobeynikovab663a02010-02-15 22:37:53 +000013#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
Chris Lattnerb8666022009-09-16 01:46:41 +000014#include "llvm/Target/TargetLoweringObjectFile.h"
Chandler Carruth802d7552012-12-04 07:12:27 +000015#include "llvm/Target/TargetMachine.h"
Chris Lattnerb8666022009-09-16 01:46:41 +000016
17namespace llvm {
Anton Korobeynikovae4ccc12010-02-15 22:35:59 +000018
Bill Wendling8ed44462012-06-26 10:05:06 +000019 /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
Bill Wendling03448742010-03-15 19:04:37 +000020 /// x86-64.
Bill Wendling8ed44462012-06-26 10:05:06 +000021 class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
Bill Wendling03448742010-03-15 19:04:37 +000022 public:
Daniel Jasper7e198ad2014-02-19 12:26:01 +000023 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
24 unsigned Encoding, Mangler &Mang,
25 MachineModuleInfo *MMI,
26 MCStreamer &Streamer) const
Rafael Espindola10705012014-02-08 06:07:27 +000027 LLVM_OVERRIDE;
Rafael Espindola08704342011-04-27 23:08:15 +000028
29 // getCFIPersonalitySymbol - The symbol that gets passed to
30 // .cfi_personality.
Rafael Espindolafa0f7282014-02-08 14:53:28 +000031 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
Rafael Espindola10705012014-02-08 06:07:27 +000032 MachineModuleInfo *MMI) const
33 LLVM_OVERRIDE;
Chris Lattnerb8666022009-09-16 01:46:41 +000034 };
Anton Korobeynikovae4ccc12010-02-15 22:35:59 +000035
Rafael Espindolaca3e0ee2012-06-19 00:48:28 +000036 /// X86LinuxTargetObjectFile - This implementation is used for linux x86
37 /// and x86-64.
38 class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF {
Rafael Espindola10705012014-02-08 06:07:27 +000039 void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE;
David Blaikie1b01ae82013-07-01 21:45:25 +000040
41 /// \brief Describe a TLS variable address within debug info.
Rafael Espindola10705012014-02-08 06:07:27 +000042 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const
43 LLVM_OVERRIDE;
Rafael Espindolaca3e0ee2012-06-19 00:48:28 +000044 };
45
David Majnemerdee10572014-01-15 09:16:42 +000046 /// \brief This implementation is used for Windows targets on x86 and x86-64.
47 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
Rafael Espindola10705012014-02-08 06:07:27 +000048 const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE,
Daniel Jasper7e198ad2014-02-19 12:26:01 +000049 Mangler &Mang) const
Rafael Espindola10705012014-02-08 06:07:27 +000050 LLVM_OVERRIDE;
David Majnemerdee10572014-01-15 09:16:42 +000051 };
52
Chris Lattnerb8666022009-09-16 01:46:41 +000053} // end namespace llvm
54
55#endif