[clang] bf91252 - [RISCV] Remove unnecessary call to isSupportedExtensionFeature.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 9 14:38:09 PST 2023
Author: Craig Topper
Date: 2023-12-09T14:38:03-08:00
New Revision: bf9125294da1f3cf03a88356e068725c6f88bea6
URL: https://github.com/llvm/llvm-project/commit/bf9125294da1f3cf03a88356e068725c6f88bea6
DIFF: https://github.com/llvm/llvm-project/commit/bf9125294da1f3cf03a88356e068725c6f88bea6.diff
LOG: [RISCV] Remove unnecessary call to isSupportedExtensionFeature.
hasExtension already checks if the extension is supported.
Added:
Modified:
clang/lib/Basic/Targets/RISCV.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/Targets/RISCV.cpp b/clang/lib/Basic/Targets/RISCV.cpp
index 1a4300e16ce7b..b1733b878e88e 100644
--- a/clang/lib/Basic/Targets/RISCV.cpp
+++ b/clang/lib/Basic/Targets/RISCV.cpp
@@ -347,10 +347,7 @@ bool RISCVTargetInfo::hasFeature(StringRef Feature) const {
if (Result)
return *Result;
- if (ISAInfo->isSupportedExtensionFeature(Feature))
- return ISAInfo->hasExtension(Feature);
-
- return false;
+ return ISAInfo->hasExtension(Feature);
}
/// Perform initialization based on the user configured set of features.
More information about the cfe-commits
mailing list