================ @@ -26,6 +28,98 @@ static AsmFlavor inferFlavor(const CIRGenModule &cgm, const AsmStmt &s) { return isa<MSAsmStmt>(&s) ? AsmFlavor::x86_intel : gnuAsmFlavor; } +// FIXME(cir): This should be a common helper between CIRGen +// and traditional CodeGen +static std::string simplifyConstraint( + const char *constraint, const TargetInfo &target, ---------------- andykaylor wrote:
This code relies on the assumption that `constraint` is zero-terminated. That's guaranteed by the fact that the call site is using std::string::c_str() to get the pointer, but in general it's not a safe assumption, so it might be a good idea to change the interface to take a std::string reference argument when you move the code. https://github.com/llvm/llvm-project/pull/154014 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits