[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 07:13:03 PDT 2025
================
@@ -1958,6 +1958,24 @@ references can be used instead of numeric references.
return -1;
}
+
+Constexpr strings in GNU ASM statememts
+=======================================
+
+In C++11 mode (and greater), Clang supports specifying the template,
+constraints, and clobber strings with a parenthesized constant expression
+producing an object with ``data`` and ``size`` member functions,
+such as ``std::string``.
----------------
erichkeane wrote:
to be coy, it might be nice to list `std::string_view` and `std::vector` here too (or just `std::vector<char>`?). There are ALSO constraints based on whether `data` returns a char type or `size` returns an integral type, right? We should probably mention that.
https://github.com/llvm/llvm-project/pull/131003
More information about the cfe-commits
mailing list