craig.topper added inline comments.
================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:385
+          StringRef ExtName = Ext.substr(1);
+          if (llvm::RISCVISAInfo::isSupportedExtensionWithVersion(ExtName) ||
+              llvm::RISCVISAInfo::isSupportedExtension(ExtName))
----------------
I wonder if we could encapsulate this `if` and the 3 calls into RISCVISAInfo 
into a single function in RISCVISAInfo?

Basically we want to know if an extension that may or may not have a version, 
is a valid extension and if so what is the target feature name for it. We could 
have one function that does all that and returns the target feature name or an 
empty string.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151730/new/

https://reviews.llvm.org/D151730

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to