2012-02-18 20:03:15 +08:00
|
|
|
//===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
|
2009-09-16 09:46:41 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
|
2009-09-16 09:46:41 +08:00
|
|
|
|
2010-02-16 06:37:53 +08:00
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
2009-09-16 09:46:41 +08:00
|
|
|
#include "llvm/Target/TargetLoweringObjectFile.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
2010-02-16 06:35:59 +08:00
|
|
|
|
2012-06-26 18:05:06 +08:00
|
|
|
/// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
|
2010-03-16 03:04:37 +08:00
|
|
|
/// x86-64.
|
2012-06-26 18:05:06 +08:00
|
|
|
class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
|
2010-03-16 03:04:37 +08:00
|
|
|
public:
|
2014-02-20 01:23:20 +08:00
|
|
|
const MCExpr *
|
|
|
|
getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
|
|
|
|
Mangler &Mang, const TargetMachine &TM,
|
2014-03-02 17:09:27 +08:00
|
|
|
MachineModuleInfo *MMI,
|
|
|
|
MCStreamer &Streamer) const override;
|
2011-04-28 07:08:15 +08:00
|
|
|
|
|
|
|
// getCFIPersonalitySymbol - The symbol that gets passed to
|
|
|
|
// .cfi_personality.
|
2014-02-08 22:53:28 +08:00
|
|
|
MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
|
2014-02-20 01:23:20 +08:00
|
|
|
const TargetMachine &TM,
|
2014-03-02 17:09:27 +08:00
|
|
|
MachineModuleInfo *MMI) const override;
|
2010-02-16 06:35:59 +08:00
|
|
|
};
|
|
|
|
|
2012-06-19 08:48:28 +08:00
|
|
|
/// X86LinuxTargetObjectFile - This implementation is used for linux x86
|
|
|
|
/// and x86-64.
|
|
|
|
class X86LinuxTargetObjectFile : public TargetLoweringObjectFileELF {
|
2014-03-02 17:09:27 +08:00
|
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
2013-07-02 05:45:25 +08:00
|
|
|
|
|
|
|
/// \brief Describe a TLS variable address within debug info.
|
2014-03-02 17:09:27 +08:00
|
|
|
const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
|
2012-06-19 08:48:28 +08:00
|
|
|
};
|
|
|
|
|
2014-01-15 17:16:42 +08:00
|
|
|
/// \brief This implementation is used for Windows targets on x86 and x86-64.
|
|
|
|
class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
|
2014-03-02 17:09:27 +08:00
|
|
|
const MCExpr *
|
|
|
|
getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
|
|
|
|
const TargetMachine &TM) const override;
|
2014-07-15 06:57:27 +08:00
|
|
|
|
|
|
|
/// \brief Given a mergeable constant with the specified size and relocation
|
|
|
|
/// information, return a section that it should be placed in.
|
|
|
|
const MCSection *getSectionForConstant(SectionKind Kind,
|
|
|
|
const Constant *C) const override;
|
2014-01-15 17:16:42 +08:00
|
|
|
};
|
|
|
|
|
2009-09-16 09:46:41 +08:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|