1 //===-------- AMDGPUELFStreamer.cpp - ELF Object Output -------------------===//
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 
10 #include "AMDGPUELFStreamer.h"
11 #include "Utils/AMDGPUBaseInfo.h"
12 #include "llvm/BinaryFormat/ELF.h"
13 #include "llvm/MC/MCAsmBackend.h"
14 #include "llvm/MC/MCCodeEmitter.h"
15 #include "llvm/MC/MCObjectWriter.h"
16 
17 using namespace llvm;
18 
19 namespace {
20 
21 class AMDGPUELFStreamer : public MCELFStreamer {
22 public:
AMDGPUELFStreamer(const Triple & T,MCContext & Context,std::unique_ptr<MCAsmBackend> MAB,std::unique_ptr<MCObjectWriter> OW,std::unique_ptr<MCCodeEmitter> Emitter)23   AMDGPUELFStreamer(const Triple &T, MCContext &Context,
24                     std::unique_ptr<MCAsmBackend> MAB,
25                     std::unique_ptr<MCObjectWriter> OW,
26                     std::unique_ptr<MCCodeEmitter> Emitter)
27       : MCELFStreamer(Context, std::move(MAB), std::move(OW),
28                       std::move(Emitter)) {}
29 };
30 
31 }
32 
createAMDGPUELFStreamer(const Triple & T,MCContext & Context,std::unique_ptr<MCAsmBackend> MAB,std::unique_ptr<MCObjectWriter> OW,std::unique_ptr<MCCodeEmitter> Emitter,bool RelaxAll)33 MCELFStreamer *llvm::createAMDGPUELFStreamer(
34     const Triple &T, MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
35     std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter,
36     bool RelaxAll) {
37   return new AMDGPUELFStreamer(T, Context, std::move(MAB), std::move(OW),
38                                std::move(Emitter));
39 }
40