[PATCH] D67051: [LLD] [COFF] Demangle itanium symbols in mingw mode

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 12:24:21 PDT 2019


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
Comment at: lld/trunk/COFF/Symbols.cpp:31
+  if (config->demangle) {
     if (Optional<std::string> s = demangleMSVC(symName))
       return *s;
----------------
rnk wrote:
> It is trivial to disambiguate Itanium and MSVC symbols just by looking at the prefix. For both mangling types, we should ignore `__imp_` prefixes in the same way. Then, Itanium names match `_+Z`, and Microsoft names start with `?`.
> 
> I think we should get rid of the two `lld::demangleItanium/MSVC` variants, add a check for `?` in `llvm::demangle`, and standardize on that. The COFF demangle helper can do the `__imp_` handling. Make sense?
Sounds sensible, I'll put it on my backlog and give it a shot.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67051





More information about the llvm-commits mailing list