mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[RISCV][NFC] Don't need to create a new STI in RISCVAsmPrinter.
RISCVAsmPrinter already has MCSubtargetInfo. Reviewed By: HsiangKai Differential Revision: https://reviews.llvm.org/D101889
This commit is contained in:
parent
a570a424f6
commit
778f90415f
@ -193,16 +193,7 @@ void RISCVAsmPrinter::emitEndOfAsmFile(Module &M) {
|
||||
void RISCVAsmPrinter::emitAttributes() {
|
||||
RISCVTargetStreamer &RTS =
|
||||
static_cast<RISCVTargetStreamer &>(*OutStreamer->getTargetStreamer());
|
||||
|
||||
const Triple &TT = TM.getTargetTriple();
|
||||
StringRef CPU = TM.getTargetCPU();
|
||||
StringRef FS = TM.getTargetFeatureString();
|
||||
const RISCVTargetMachine &RTM = static_cast<const RISCVTargetMachine &>(TM);
|
||||
/* TuneCPU doesn't impact emission of ELF attributes, ELF attributes only
|
||||
care about arch related features, so we can set TuneCPU as CPU. */
|
||||
const RISCVSubtarget STI(TT, CPU, /*TuneCPU=*/CPU, FS, /*ABIName=*/"", RTM);
|
||||
|
||||
RTS.emitTargetAttributes(STI);
|
||||
RTS.emitTargetAttributes(*STI);
|
||||
}
|
||||
|
||||
// Force static initialization.
|
||||
|
Loading…
Reference in New Issue
Block a user