Skip to content

Commit 0950354

Browse files
committed
Address comments
1 parent 11d6bf5 commit 0950354

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

llvm/lib/IR/Function.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,22 @@ Function *Function::Create(FunctionType *Ty, LinkageTypes Linkage,
390390

391391
StringRef Function::getDefaultTargetFeatures(const StringRef TargetABI) {
392392
Triple T(getParent()->getTargetTriple());
393-
StringRef attr = "";
393+
StringRef Attr = "";
394394
if (T.isRISCV64()) {
395395
if (TargetABI.equals_insensitive("lp64d"))
396-
attr = "+d";
396+
Attr = "+d";
397397
else if (TargetABI.equals_insensitive("lp64f"))
398-
attr = "+f";
399-
else if (TargetABI.equals_insensitive("lp64q"))
400-
attr = "+q";
401-
} else if (T.isRISCV32() && TargetABI.contains("ilp32f")) {
402-
attr = "+f";
398+
Attr = "+f";
399+
} else if (T.isRISCV32()) {
400+
if (TargetABI.equals_insensitive("ilp32d"))
401+
Attr = "+d";
402+
else if (TargetABI.equals_insensitive("ilp32f"))
403+
Attr = "+f";
403404
} else if (T.isARM() || T.isThumb()) {
404-
attr = "+thumb-mode";
405+
Attr = "+thumb-mode";
405406
}
406407

407-
return attr;
408+
return Attr;
408409
}
409410

410411
Function *Function::createWithDefaultAttr(FunctionType *Ty,

0 commit comments

Comments
 (0)