[PATCH] D123138: [demangler] Fix undocumented Local encoding

Iain Sandoe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 02:54:05 PDT 2022


iains added a comment.

just to clarify the intent for:

  export module A;
  
  static int addone (int y) { return y + 1; }
  static int x = 5;
  
  export int addsix (int z) { return x + addone (z); }

GCC mangles addone => `_ZW1AL6addonei`
and x as `_ZW1AL1x`

clang mangles them as `_ZL6addonei` and `_ZL1x` respectively.

Whilst this makes no practical difference (since the symbols are TU-local in either case) - I was expecting that decls in the purview of A would be attached to it (and thus mangled as such).   I guess I missed some subtlety.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123138/new/

https://reviews.llvm.org/D123138



More information about the llvm-commits mailing list