aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorHongren Zheng <i@zenithal.me>2025-01-28 13:31:41 +0800
committerGitHub <noreply@github.com>2025-01-28 13:31:41 +0800
commit3c64f86314fbf9a3cd578419f16e621a4de57eaa (patch)
treea399e2338300928dea806965dad109a977954384 /clang/unittests/Format/ConfigParseTest.cpp
parent7f37b34d31914120a5bb6bd341e7616773df7613 (diff)
downloadllvm-3c64f86314fbf9a3cd578419f16e621a4de57eaa.zip
llvm-3c64f86314fbf9a3cd578419f16e621a4de57eaa.tar.gz
llvm-3c64f86314fbf9a3cd578419f16e621a4de57eaa.tar.bz2
[mlir] Add OpAsmTypeInterface for pretty-print (#121187)
See https://discourse.llvm.org/t/rfc-introduce-opasm-type-attr-interface-for-pretty-print-in-asmprinter/83792 for detailed introduction. This PR acts as the first part of it * Add `OpAsmTypeInterface` and `getAsmName` API for deducing ASM name from type * Add default impl in `OpAsmOpInterface` to respect this API when available. The `OpAsmAttrInterface` / hooking into Alias system part should be another PR, using a `getAlias` API. ### Discussion * Instead of using `StringRef getAsmName()` as the API, I use `void getAsmName(OpAsmSetNameFn)`, as returning StringRef might be unsafe (std::string constructed inside then returned a _ref_; and this aligns with the design of `getAsmResultNames`. * On the result packing of an op, the current approach is that when not all of the result types are `OpAsmTypeInterface`, then do nothing (old default impl) ### Review Cc @j2kun and @Alexanderviand-intel for downstream; Cc @River707 and @joker-eph for relevent commit history; Cc @ftynse for discourse.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
0 files changed, 0 insertions, 0 deletions