[PATCH] D76999: [ELF] Print versioned name for better "undefined symbol" diagnostics
    Fangrui Song via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar 30 11:57:10 PDT 2020
    
    
  
MaskRay marked an inline comment as done.
MaskRay added inline comments.
================
Comment at: lld/ELF/Relocations.cpp:903
+      if (name.data()[name.size()] == '@')
+        msg += name.data() + name.size();
+      msg += post_hint;
----------------
grimar wrote:
> This is OK I think. Though I wonder if it would be cleaner to add a method to `Symbol` like:
> 
> ```
>  StringRef getFullName() const { return {nameData}; }
> ```
> 
> And just use it?
We need to demangle the unversioned part, then append @.
The demangler cannot process @. I changed lld::toString instead.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76999/new/
https://reviews.llvm.org/D76999
    
    
More information about the llvm-commits
mailing list