[PATCH] D29710: [globalisel] OperandPredicateMatcher's shouldn't need to generate the MachineOperand expr. NFC

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 01:10:42 PST 2017


dsanders added inline comments.


================
Comment at: utils/TableGen/GlobalISelEmitter.cpp:218
   OperandMatcher(unsigned OpIdx) : OpIdx(OpIdx) {}
+  std::string getOperandExpr(const StringRef InsnVarName) const {
+    return (InsnVarName + ".getOperand(" + std::to_string(OpIdx) + ")").str();
----------------
ab wrote:
> "const StringRef" -> StringRef
> 
> (I now realize we had the same elsewhere; fixed that in r294555).
What's wrong with 'const StringRef'? Why should InsnVarName be assignable?


https://reviews.llvm.org/D29710





More information about the llvm-commits mailing list