2015-09-26 05:41:28 +08:00
|
|
|
//===-------- AMDGPUELFStreamer.cpp - ELF Object Output -------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AMDGPUELFStreamer.h"
|
|
|
|
#include "Utils/AMDGPUBaseInfo.h"
|
2017-10-06 00:19:18 +08:00
|
|
|
#include "llvm/BinaryFormat/ELF.h"
|
2017-10-11 09:57:21 +08:00
|
|
|
#include "llvm/MC/MCAsmBackend.h"
|
2017-10-12 07:34:47 +08:00
|
|
|
#include "llvm/MC/MCCodeEmitter.h"
|
2018-05-19 02:26:45 +08:00
|
|
|
#include "llvm/MC/MCObjectWriter.h"
|
2015-09-26 05:41:28 +08:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
2018-05-19 02:26:45 +08:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
class AMDGPUELFStreamer : public MCELFStreamer {
|
|
|
|
public:
|
|
|
|
AMDGPUELFStreamer(const Triple &T, MCContext &Context,
|
|
|
|
std::unique_ptr<MCAsmBackend> MAB,
|
|
|
|
std::unique_ptr<MCObjectWriter> OW,
|
|
|
|
std::unique_ptr<MCCodeEmitter> Emitter)
|
|
|
|
: MCELFStreamer(Context, std::move(MAB), std::move(OW),
|
|
|
|
std::move(Emitter)) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-10-11 09:57:21 +08:00
|
|
|
MCELFStreamer *llvm::createAMDGPUELFStreamer(
|
|
|
|
const Triple &T, MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
|
2018-05-19 02:26:45 +08:00
|
|
|
std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter,
|
2017-10-12 07:34:47 +08:00
|
|
|
bool RelaxAll) {
|
2018-05-19 02:26:45 +08:00
|
|
|
return new AMDGPUELFStreamer(T, Context, std::move(MAB), std::move(OW),
|
2017-10-12 07:34:47 +08:00
|
|
|
std::move(Emitter));
|
2015-09-26 05:41:28 +08:00
|
|
|
}
|