[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.
Sriraman Tallam via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 21 13:12:01 PST 2020
tmsriram added inline comments.
================
Comment at: llvm/lib/IR/DebugInfoMetadata.cpp:881
+void DISubprogram::replaceRawLinkageName(MDString *LinkageName) {
+ replaceOperandWith(3, LinkageName);
+}
----------------
Nit, Move the body to DebugInfoMetadata.h itself?
================
Comment at: llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp:51
+ auto Name = MDB.createString(F.getName());
+ SP->replaceRawLinkageName(Name);
+ }
----------------
hoy wrote:
> tmsriram wrote:
> > Do we need to check if it had a rawLinkageName before replacing it?
> Good point. `rawLinkageName` is missing for C programs. I think it might still be appropriate to assign a new linkage name in the case so as to differ from the original source function name. What do you think?
@dblaikie Adding the expert here. As far as I understand, the linkage name is the mangled name and this would capture this too correctly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93656/new/
https://reviews.llvm.org/D93656
More information about the cfe-commits
mailing list