mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-02 13:12:09 +00:00

To be consistent with RISC-V branding guidelines https://riscv.org/about/risc-v-branding-guidelines/ Think we should be using RISC-V where possible. More patches will follow. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D146449
27 lines
963 B
C++
27 lines
963 B
C++
//===-- RISCVMCObjectFileInfo.cpp - RISC-V object file properties ---------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declarations of the RISCVMCObjectFileInfo properties.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "RISCVMCObjectFileInfo.h"
|
|
#include "RISCVMCTargetDesc.h"
|
|
#include "llvm/MC/MCContext.h"
|
|
#include "llvm/MC/MCSubtargetInfo.h"
|
|
|
|
using namespace llvm;
|
|
|
|
unsigned RISCVMCObjectFileInfo::getTextSectionAlignment() const {
|
|
const MCSubtargetInfo *STI = getContext().getSubtargetInfo();
|
|
return (STI->hasFeature(RISCV::FeatureStdExtC) ||
|
|
STI->hasFeature(RISCV::FeatureExtZca))
|
|
? 2
|
|
: 4;
|
|
}
|