]> git.proxmox.com Git - rustc.git/blame - src/llvm/lib/Target/X86/X86TargetObjectFile.h
Imported Upstream version 1.0.0+dfsg1
[rustc.git] / src / llvm / lib / Target / X86 / X86TargetObjectFile.h
CommitLineData
223e47cc
LB
1//===-- 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
1a4d82fc
JJ
10#ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
11#define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
223e47cc
LB
12
13#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
223e47cc
LB
14#include "llvm/Target/TargetLoweringObjectFile.h"
15
16namespace llvm {
17
18 /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
19 /// x86-64.
20 class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
21 public:
1a4d82fc
JJ
22 const MCExpr *
23 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
24 Mangler &Mang, const TargetMachine &TM,
25 MachineModuleInfo *MMI,
26 MCStreamer &Streamer) const override;
223e47cc
LB
27
28 // getCFIPersonalitySymbol - The symbol that gets passed to
29 // .cfi_personality.
1a4d82fc
JJ
30 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
31 const TargetMachine &TM,
32 MachineModuleInfo *MMI) const override;
223e47cc
LB
33 };
34
35 /// X86LinuxTargetObjectFile - This implementation is used for linux x86
36 /// and x86-64.
37 class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF {
1a4d82fc
JJ
38 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
39
40 /// \brief Describe a TLS variable address within debug info.
41 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
42 };
43
44 /// \brief This implementation is used for Windows targets on x86 and x86-64.
45 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
46 const MCExpr *
47 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
48 const TargetMachine &TM) const override;
49
50 /// \brief Given a mergeable constant with the specified size and relocation
51 /// information, return a section that it should be placed in.
52 const MCSection *getSectionForConstant(SectionKind Kind,
53 const Constant *C) const override;
223e47cc
LB
54 };
55
56} // end namespace llvm
57
58#endif