1 //===-- WebAssemblyTargetObjectFile.h - WebAssembly Object Info -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 /// \brief This file declares the WebAssembly-specific subclass of
12 /// TargetLoweringObjectFile.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETOBJECTFILE_H
17 #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYTARGETOBJECTFILE_H
19 #include "llvm/Target/TargetLoweringObjectFile.h"
25 class WebAssemblyTargetObjectFile final : public TargetLoweringObjectFile {
27 WebAssemblyTargetObjectFile() {
28 TextSection = nullptr;
29 DataSection = nullptr;
31 ReadOnlySection = nullptr;
33 StaticCtorSection = nullptr;
34 StaticDtorSection = nullptr;
35 LSDASection = nullptr;
36 EHFrameSection = nullptr;
37 DwarfAbbrevSection = nullptr;
38 DwarfInfoSection = nullptr;
39 DwarfLineSection = nullptr;
40 DwarfFrameSection = nullptr;
41 DwarfPubTypesSection = nullptr;
42 DwarfDebugInlineSection = nullptr;
43 DwarfStrSection = nullptr;
44 DwarfLocSection = nullptr;
45 DwarfARangesSection = nullptr;
46 DwarfRangesSection = nullptr;
49 MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
50 const Constant *C) const override {
51 return ReadOnlySection;
54 MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
56 const TargetMachine &TM) const override {
60 MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
62 const TargetMachine &TM) const override;
65 } // end namespace llvm