blob: 22f3e572d9c0e1f3483b93cda9e11da6203adb3d [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:
Rafael Espindoladaeafb42014-02-19 17:23:20 +000023 const MCExpr *
24 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
25 Mangler &Mang, const TargetMachine &TM,
26 MachineModuleInfo *MMI, 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 Espindoladaeafb42014-02-19 17:23:20 +000032 const TargetMachine &TM,
Rafael Espindola10705012014-02-08 06:07:27 +000033 MachineModuleInfo *MMI) const
34 LLVM_OVERRIDE;
Chris Lattnerb8666022009-09-16 01:46:41 +000035 };
Anton Korobeynikovae4ccc12010-02-15 22:35:59 +000036
Rafael Espindolaca3e0ee2012-06-19 00:48:28 +000037 /// X86LinuxTargetObjectFile - This implementation is used for linux x86
38 /// and x86-64.
39 class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF {
Rafael Espindola10705012014-02-08 06:07:27 +000040 void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE;
David Blaikie1b01ae82013-07-01 21:45:25 +000041
42 /// \brief Describe a TLS variable address within debug info.
Rafael Espindola10705012014-02-08 06:07:27 +000043 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const
44 LLVM_OVERRIDE;
Rafael Espindolaca3e0ee2012-06-19 00:48:28 +000045 };
46
David Majnemerdee10572014-01-15 09:16:42 +000047 /// \brief This implementation is used for Windows targets on x86 and x86-64.
48 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
Rafael Espindola10705012014-02-08 06:07:27 +000049 const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE,
Rafael Espindoladaeafb42014-02-19 17:23:20 +000050 Mangler &Mang,
51 const TargetMachine &TM) const
Rafael Espindola10705012014-02-08 06:07:27 +000052 LLVM_OVERRIDE;
David Majnemerdee10572014-01-15 09:16:42 +000053 };
54
Chris Lattnerb8666022009-09-16 01:46:41 +000055} // end namespace llvm
56
57#endif