LLVM
15.0.0git
lib
Target
RISCV
MCTargetDesc
RISCVMCObjectFileInfo.cpp
Go to the documentation of this file.
1
//===-- RISCVMCObjectFileInfo.cpp - RISCV object file properties ----------===//
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
// This file contains the declarations of the RISCVMCObjectFileInfo properties.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
RISCVMCObjectFileInfo.h
"
14
#include "
RISCVMCTargetDesc.h
"
15
#include "
llvm/MC/MCContext.h
"
16
#include "
llvm/MC/MCSubtargetInfo.h
"
17
18
using namespace
llvm
;
19
20
unsigned
RISCVMCObjectFileInfo::getTextSectionAlignment
()
const
{
21
const
MCSubtargetInfo
*STI =
getContext
().
getSubtargetInfo
();
22
return
STI->
hasFeature
(RISCV::FeatureStdExtC) ? 2 : 4;
23
}
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
RISCVMCObjectFileInfo.h
llvm::MCObjectFileInfo::getContext
MCContext & getContext() const
Definition:
MCObjectFileInfo.h:244
llvm::MCSubtargetInfo::hasFeature
bool hasFeature(unsigned Feature) const
Definition:
MCSubtargetInfo.h:119
MCContext.h
MCSubtargetInfo.h
RISCVMCTargetDesc.h
llvm::MCContext::getSubtargetInfo
const MCSubtargetInfo * getSubtargetInfo() const
Definition:
MCContext.h:445
llvm::RISCVMCObjectFileInfo::getTextSectionAlignment
unsigned getTextSectionAlignment() const override
Definition:
RISCVMCObjectFileInfo.cpp:20
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition:
MCSubtargetInfo.h:76
Generated on Fri May 27 2022 09:53:35 for LLVM by
1.8.17