LLVM  10.0.0svn
AMDGPUELFStreamer.cpp
Go to the documentation of this file.
1 //===-------- AMDGPUELFStreamer.cpp - ELF Object Output -------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "AMDGPUELFStreamer.h"
10 #include "Utils/AMDGPUBaseInfo.h"
11 #include "llvm/BinaryFormat/ELF.h"
12 #include "llvm/MC/MCAsmBackend.h"
13 #include "llvm/MC/MCCodeEmitter.h"
14 #include "llvm/MC/MCObjectWriter.h"
15 
16 using namespace llvm;
17 
18 namespace {
19 
20 class AMDGPUELFStreamer : public MCELFStreamer {
21 public:
22  AMDGPUELFStreamer(const Triple &T, MCContext &Context,
23  std::unique_ptr<MCAsmBackend> MAB,
24  std::unique_ptr<MCObjectWriter> OW,
25  std::unique_ptr<MCCodeEmitter> Emitter)
26  : MCELFStreamer(Context, std::move(MAB), std::move(OW),
27  std::move(Emitter)) {}
28 };
29 
30 }
31 
33  const Triple &T, MCContext &Context, std::unique_ptr<MCAsmBackend> MAB,
34  std::unique_ptr<MCObjectWriter> OW, std::unique_ptr<MCCodeEmitter> Emitter,
35  bool RelaxAll) {
36  return new AMDGPUELFStreamer(T, Context, std::move(MAB), std::move(OW),
37  std::move(Emitter));
38 }
LLVMContext & Context
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Definition: BitVector.h:937
Context object for machine code objects.
Definition: MCContext.h:65
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
MCELFStreamer * createAMDGPUELFStreamer(const Triple &T, MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter, bool RelaxAll)