Path: blob/main/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetObjectFile.h
35271 views
//===-- LanaiTargetObjectFile.h - Lanai Object Info -----------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H9#define LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H1011#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"1213namespace llvm {14class LanaiTargetObjectFile : public TargetLoweringObjectFileELF {15MCSection *SmallDataSection;16MCSection *SmallBSSSection;1718bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM,19SectionKind Kind) const;20bool isGlobalInSmallSectionImpl(const GlobalObject *GO,21const TargetMachine &TM) const;2223public:24void Initialize(MCContext &Ctx, const TargetMachine &TM) override;2526/// Return true if this global address should be placed into small data/bss27/// section.28bool isGlobalInSmallSection(const GlobalObject *GO,29const TargetMachine &TM) const;3031MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,32const TargetMachine &TM) const override;3334/// Return true if this constant should be placed into small data section.35bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const;3637MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,38const Constant *C,39Align &Alignment) const override;40};41} // end namespace llvm4243#endif // LLVM_LIB_TARGET_LANAI_LANAITARGETOBJECTFILE_H444546