[RISCV] Use Triple::isRISCV/isRISCV32/isRISCV64 helps in some places. NFC

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D132197
This commit is contained in:
Craig Topper
2022-08-19 08:59:49 -07:00
parent a47ec1b797
commit 1a60e003df
3 changed files with 9 additions and 19 deletions

View File

@@ -968,14 +968,9 @@ void CodeGenModule::EmitOpenCLMetadata() {
void CodeGenModule::EmitBackendOptionsMetadata(
const CodeGenOptions CodeGenOpts) {
switch (getTriple().getArch()) {
default:
break;
case llvm::Triple::riscv32:
case llvm::Triple::riscv64:
if (getTriple().isRISCV()) {
getModule().addModuleFlag(llvm::Module::Error, "SmallDataLimit",
CodeGenOpts.SmallDataLimit);
break;
}
}