[PATCH] D74813: [RFC] Add hash of block contents to function block names
Alex Borcan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 15 01:02:52 PDT 2020
alexbdv updated this revision to Diff 257616.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74813/new/
https://reviews.llvm.org/D74813
Files:
clang/lib/AST/Mangle.cpp
Index: clang/lib/AST/Mangle.cpp
===================================================================
--- clang/lib/AST/Mangle.cpp
+++ clang/lib/AST/Mangle.cpp
@@ -36,11 +36,14 @@
StringRef Outer,
const BlockDecl *BD,
raw_ostream &Out) {
- unsigned discriminator = Context.getBlockId(BD, true);
- if (discriminator == 0)
- Out << "__" << Outer << "_block_invoke";
- else
- Out << "__" << Outer << "_block_invoke_" << discriminator+1;
+ Out << "__" << Outer << "_block_invoke__";
+
+ ArrayRef<ParmVarDecl *> params = BD->parameters();
+ for(unsigned i = 0; i < params.size(); i++) {
+ ParmVarDecl *param = params[i];
+ Out << "_";
+ Context.mangleTypeName(param->getType(), Out);
+ }
}
void MangleContext::anchor() { }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74813.257616.patch
Type: text/x-patch
Size: 841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200415/7e5c4639/attachment.bin>
More information about the cfe-commits
mailing list