2016-03-11 16:00:27 +08:00
|
|
|
//===-------- AMDGPUELFStreamer.h - ELF Object Output -----------*- C++ -*-===//
|
2015-09-26 05:41:28 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This is a custom MCELFStreamer which allows us to insert some hooks before
|
|
|
|
// emitting data into an actual object file.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUELFSTREAMER_H
|
|
|
|
#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUELFSTREAMER_H
|
|
|
|
|
|
|
|
#include "llvm/MC/MCELFStreamer.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MCAsmBackend;
|
|
|
|
class MCCodeEmitter;
|
|
|
|
class MCContext;
|
|
|
|
class MCSubtargetInfo;
|
|
|
|
|
|
|
|
class AMDGPUELFStreamer : public MCELFStreamer {
|
|
|
|
public:
|
2017-10-11 09:57:21 +08:00
|
|
|
AMDGPUELFStreamer(const Triple &T, MCContext &Context,
|
|
|
|
std::unique_ptr<MCAsmBackend> MAB, raw_pwrite_stream &OS,
|
2018-02-17 06:33:59 +08:00
|
|
|
std::unique_ptr<MCCodeEmitter> Emitter)
|
|
|
|
: MCELFStreamer(Context, std::move(MAB), OS, std::move(Emitter)) {}
|
2015-09-26 05:41:28 +08:00
|
|
|
};
|
|
|
|
|
2017-10-06 00:19:18 +08:00
|
|
|
MCELFStreamer *createAMDGPUELFStreamer(const Triple &T, MCContext &Context,
|
2017-10-11 09:57:21 +08:00
|
|
|
std::unique_ptr<MCAsmBackend> MAB,
|
|
|
|
raw_pwrite_stream &OS,
|
2017-10-12 07:34:47 +08:00
|
|
|
std::unique_ptr<MCCodeEmitter> Emitter,
|
|
|
|
bool RelaxAll);
|
2015-09-26 05:41:28 +08:00
|
|
|
} // namespace llvm.
|
|
|
|
|
|
|
|
#endif
|