[clang] [clang][CrossTU] Indicate weak link attribute in ExternalDefMap. (PR #204188)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 07:47:50 PDT 2026
================
@@ -279,6 +306,8 @@ CrossTranslationUnitContext::~CrossTranslationUnitContext() {}
std::optional<std::string>
CrossTranslationUnitContext::getLookupName(const Decl *D) {
SmallString<128> DeclUSR;
+ if (D->hasAttr<WeakAttr>())
+ DeclUSR.push_back('-');
----------------
steakhal wrote:
This cannot be fixed at the CTU context level. it must be fixed within the `index` library, namely somewhere below `generateUSRForDecl`.
Please also explore if it would conflict with ObjectiveC interface declarations; some of those can have `-` and `+` signs in their declaration, which makes me worried about accidental mangling conflicts.
https://github.com/llvm/llvm-project/pull/204188
More information about the cfe-commits
mailing list