[llvm] [NFC][TableGen] Use StringRef in X86RecognizableInstr (PR #139648)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Mon May 12 22:28:23 PDT 2025


================
@@ -440,8 +440,7 @@ void RecognizableInstr::adjustOperandEncoding(OperandEncoding &encoding) {
 void RecognizableInstr::handleOperand(
     bool optional, unsigned &operandIndex, unsigned &physicalOperandIndex,
     unsigned numPhysicalOperands, const unsigned *operandMapping,
-    OperandEncoding (*encodingFromString)(const std::string &,
-                                          uint8_t OpSize)) {
+    OperandEncoding (*encodingFromString)(StringRef, uint8_t OpSize)) {
----------------
wangpc-pp wrote:

Use `using` or `typedef` for this function type?

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


More information about the llvm-commits mailing list