[llvm] [RISCV][MC] Implement ISA mapping symbols (PR #67541)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 12:10:38 PST 2024


================
@@ -44,14 +45,33 @@ RISCVTargetELFStreamer::RISCVTargetELFStreamer(MCStreamer &S,
   // its ParseInstruction may call setForceRelocs as well.
   if (STI.hasFeature(RISCV::FeatureRelax))
     static_cast<RISCVAsmBackend &>(MAB).setForceRelocs();
+
+  // Using RISCVISAInfo, construct ISAString from given features.
+  std::stringstream SS(STI.getFeatureString().str());
+  std::string Feature;
+  std::vector<std::string> FeatureVec;
+  while (std::getline(SS, Feature, ','))
----------------
topperc wrote:

Can this use StringRef::split?

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


More information about the llvm-commits mailing list