[PATCH] D150803: [WebAssembly] Support `annotate` clang attributes for marking functions.
Brendan Dahl via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 27 15:34:04 PDT 2023
brendandahl added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:585-598
+ // The fifth field is an optional pointer to the arguments. Append each
+ // argument to the name separated by a '.'.
+ auto *ArgsVar = dyn_cast<GlobalVariable>(CS->getOperand(4)->stripPointerCasts());
+ if (ArgsVar) {
+ auto *ArgsStruct = cast<ConstantStruct>(ArgsVar->getInitializer());
+ for (Value *ArgOp : ArgsStruct->operands()) {
+ StringRef Arg;
----------------
This currently supports arguments, but it's somewhat brittle since the arguments aren't escaped. I'm fine with dropping this and only supporting name, but I think this could be useful.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150803/new/
https://reviews.llvm.org/D150803
More information about the cfe-commits
mailing list