[llvm] [CodeGen] Enhance inline asm constraint diagnostics (PR #101354)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 04:16:05 PDT 2024


================
@@ -5034,7 +5034,8 @@ class TargetLowering : public TargetLoweringBase {
   /// returns a register number of 0 and a null register class pointer.
   virtual std::pair<unsigned, const TargetRegisterClass *>
   getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
-                               StringRef Constraint, MVT VT) const;
+                               StringRef Constraint, MVT VT,
+                               std::string &ErrMsg) const;
----------------
arsenm wrote:

Out argument string message is a worse API. I would prefer to use one of the proper return with bundled error message options 

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


More information about the llvm-commits mailing list