[PATCH] D143803: [clang][alias|ifunc]: Add a diagnostic for mangled names
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 24 06:21:38 PST 2023
aaron.ballman added a reviewer: erichkeane.
aaron.ballman added a comment.
Adding Erich as he's more familiar with ifunc and friends.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:345
+ const llvm::GlobalValue *&GV,
+ const llvm::MapVector<GlobalDecl, StringRef> &MangledDeclNames) {
GV = getAliasedGlobal(Alias);
----------------
Does clang-format do this? It looks far beyond the usual 80 col limit we use.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:355
+ // Provide a note if the given function is not found and exists as a
+ // mangled name
+ for (const auto &[Decl, Name] : MangledDeclNames) {
----------------
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:359-360
+ if (ND->getName() == GV->getName()) {
+ Diags.Report(Location, diag::note_alias_requires_mangled_name)
+ << GV->getName() << Name;
+ }
----------------
Should this come with a fix-it to switch the attribute to using the mangled name instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143803/new/
https://reviews.llvm.org/D143803
More information about the cfe-commits
mailing list