[lld] [llvm] [RISCV] Don't expose any constructors of RISCVISAInfo publicly. (PR #98249)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 18:01:39 PDT 2024


================
@@ -1251,9 +1251,8 @@ mergeAttributesSection(const SmallVector<InputSectionBase *, 0> &sections) {
     }
   }
 
-  if (hasArch) {
-    if (auto result = RISCVISAInfo::postProcessAndChecking(
-            std::make_unique<RISCVISAInfo>(xlen, exts))) {
+  if (hasArch && xlen != 0) {
----------------
topperc wrote:

Note, I had to add this `xlen` check since the `xlen` is 0 if we never successfully parsed an ISA string from any object. In that case we would have generated an error earlier so the linking would fail. Maybe it would be to have a flag that indicates we found an error earlier?

https://github.com/llvm/llvm-project/pull/98249


More information about the llvm-commits mailing list