File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ static unsigned getVersionValue(unsigned MajorVersion, unsigned MinorVersion) {
131
131
void RISCVTargetInfo::getTargetDefines (const LangOptions &Opts,
132
132
MacroBuilder &Builder) const {
133
133
Builder.defineMacro (" __riscv" );
134
- bool Is64Bit = getTriple ().getArch () == llvm::Triple::riscv64 ;
134
+ bool Is64Bit = getTriple ().isRISCV64 () ;
135
135
Builder.defineMacro (" __riscv_xlen" , Is64Bit ? " 64" : " 32" );
136
136
StringRef CodeModel = getTargetOpts ().CodeModel ;
137
137
unsigned FLen = ISAInfo->getFLen ();
@@ -281,7 +281,7 @@ bool RISCVTargetInfo::initFeatureMap(
281
281
282
282
unsigned XLen = 32 ;
283
283
284
- if (getTriple ().getArch () == llvm::Triple::riscv64 ) {
284
+ if (getTriple ().isRISCV64 () ) {
285
285
Features[" 64bit" ] = true ;
286
286
XLen = 64 ;
287
287
} else {
@@ -336,7 +336,7 @@ RISCVTargetInfo::getVScaleRange(const LangOptions &LangOpts) const {
336
336
337
337
// / Return true if has this feature, need to sync with handleTargetFeatures.
338
338
bool RISCVTargetInfo::hasFeature (StringRef Feature) const {
339
- bool Is64Bit = getTriple ().getArch () == llvm::Triple::riscv64 ;
339
+ bool Is64Bit = getTriple ().isRISCV64 () ;
340
340
auto Result = llvm::StringSwitch<std::optional<bool >>(Feature)
341
341
.Case (" riscv" , true )
342
342
.Case (" riscv32" , !Is64Bit)
You can’t perform that action at this time.
0 commit comments