[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 18 12:10:05 PDT 2021
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks good - couple of minor/optional things.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:3525-3526
llvm::DINode::DIFlags &Flags) {
- const auto *FD = cast<FunctionDecl>(GD.getDecl());
+ GlobalDecl CanonicalGD = GD.getCanonicalDecl();
+ const auto *FD = cast<FunctionDecl>(CanonicalGD.getDecl());
Name = getFunctionName(FD);
----------------
I'd probably roll this into the expression rather than adding another named variable - it doesn't seem to add much readability to me at least. Up to you.
================
Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39
+static int go(a) int a;
+{
+ return glob + a;
+}
+
+
----------------
Does this need to be down here? Or would the code be a well exercised if it was up next to the go declaration above?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98799/new/
https://reviews.llvm.org/D98799
More information about the cfe-commits
mailing list